Results 1 to 11 of 11

Redirecting to index.php

This is a discussion on Redirecting to index.php within the Template Modifications forums, part of the vBulletin SEO Discussion category; I've noticed that my sites PR is different for the follow: / /index.php /index.php? My "/" is a PR3 while ...

  1. #1
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1

    Redirecting to index.php

    I've noticed that my sites PR is different for the follow:
    /
    /index.php
    /index.php?

    My "/" is a PR3 while the index.php is a PR1. I've already defined this in the vBSEO CP but that doesn't seem to be doing the trick.

    But my question is...for any of the redirects, like when you click MARK AS READ, it takes the users back to /index.php. How can I change it so it redirects to "/"?

  2. #2
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    vBSEO has this built in, and should be enabled by default.

    Look in your vBSEO Control Panel for Define Homepage Aliases and make sure it contains:
    index.php
    index.php?

    Right above that, make sure Force Forum Root as Homepage? is "Yes".

  3. #3
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1
    Maybe I'm doing something wrong then. This is what I've got:


    and in vbACP:


    Did I input something incorrectly?

  4. #4
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    It should only be:

    index.php
    index.php?

    As noted in the examples. Not the full URL.

  5. #5
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1
    OIC...I didn't see that example...I saw this example and I went by it:

    Thanks Keith! And is there anyway to make it redirect to my "/forums/" instead of "/forums/index.php"? Just wondering since my /forums/ is a PR3 and my /forums/index.php is a PR1.

  6. #6
    Senior Member
    Real Name
    Keith Cohen
    Join Date
    Jul 2005
    Location
    Raleigh, NC USA
    Posts
    6,147
    Liked
    12 times
    Look a little lower than that section. Those are just giving an example of how your PR can be split. Near the bottom it shows examples of entries into that field.


    If you use:
    index.php
    index.php?

    It should redirect to /forums/

    Example:

    http://www.fireblades.org/forums/
    http://www.fireblades.org/forums/index.php
    http://www.fireblades.org/forums/index.php?

  7. #7
    Senior Member
    Real Name
    .
    Join Date
    Jul 2006
    Posts
    386
    Liked
    3 times
    Blog Entries
    1
    lol I just noticed that and was coming to edit my post. You're too quick for me! lol

    Thanks a bunch Keith! I greatly appreciate the patience.

  8. #8
    Member
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    hmm I have this on but they don't seem to be working any ideas why?


    just double checked its working no my forum which is in a subfolder

    how do i go about getting this working on my main domain index as well?

  9. #9
    Senior Member Brandon Sheley's Avatar
    Real Name
    Brandon Sheley
    Join Date
    Oct 2005
    Location
    Kansas
    Posts
    2,347
    Liked
    19 times
    Blog Entries
    1
    okay I have a question regarding this

    I have index.php and index.php? in this vbseo settings.

    that was for forum.vbulletinsetup.com/index...

    now I have this url too
    vBulletin Setup Forums.... how can I redirect those to the root vBulletin Setup Forums

    and how do I redirect all old urls like vBulletin Setup Forums to the root ?

    thanks
    My forums: General Forums | Admin Talk (running xenforo)

  10. #10
    Member
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    my mate helped me out with my issue, putting this at the top of index.php in the root sorted it out:

    Code:
    if ($_SERVER['REQUEST_URI'] == '/index.php') 
    {
    header('HTTP/1.1 301 Moved Permanently');
    header("Location: http://{$_SERVER['HTTP_HOST']}/");
    exit;
    }
    
    if ($_SERVER['REQUEST_URI'] == '/index.php?') 
    {
    header('HTTP/1.1 301 Moved Permanently');
    header("Location: http://{$_SERVER['HTTP_HOST']}/");
    exit;
    }
    maybe that will help you with your redirects loco

  11. #11
    Senior Member Brandon Sheley's Avatar
    Real Name
    Brandon Sheley
    Join Date
    Oct 2005
    Location
    Kansas
    Posts
    2,347
    Liked
    19 times
    Blog Entries
    1
    Worked great Grumbledook

    Thank you
    My forums: General Forums | Admin Talk (running xenforo)

Similar Threads

  1. Redirecting non-www to www version
    By DN lodge in forum General Discussion
    Replies: 2
    Last Post: 03-16-2008, 12:47 PM
  2. Index.php and forum.php [Vbadvanced in same directory]
    By Wildthinks in forum vBSEO Features Archive
    Replies: 9
    Last Post: 10-09-2006, 07:13 PM
  3. Redirecting a Url
    By cathiejones in forum General Discussion
    Replies: 1
    Last Post: 07-27-2006, 06:41 PM
  4. Rewriting index.php to index.html
    By Lian in forum General Discussion
    Replies: 2
    Last Post: 07-12-2006, 03:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •