vBulletin SEO Forums

SEO

vBulletin Search Engine Optimization

Buy vBSEO Now!
vBSEO 2.0 Style Released vBSEO 3.3.0 GOLD Launched vBSEO's "LiveStats" for Google Analytics vB Sitemap Generator, Version 2.5 Success with vBSEO = 600ore Web Visitors + $1400 in a Day!

Rewrite index.php and index.php? to a folder.

This is a discussion on Rewrite index.php and index.php? to a folder. within the General Discussion forums, part of the vBulletin SEO Discussion category; Sorry if this has been done, but I have been looking for a while. How do you simply ensure all ...

Go Back   vBulletin SEO Forums > vBulletin SEO Discussion > General Discussion

Enhancing 80 million pages.

  #1  
Old 03-23-2007, 10:03 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
Rewrite index.php and index.php? to a folder.

Sorry if this has been done, but I have been looking for a while.

How do you simply ensure all URL's folder/index.php & folder/index.php? redirect to folder/. I have tried various ways but I just seem to end up with an infinate loop. I am trying with 'gallery' at the moment.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #2  
Old 03-23-2007, 10:17 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Hello,

you should enable "Force Forum Root as Homepage?" option in vbseocp and define Homepage Aliases as:
Code:
index.php
index.php?
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #3  
Old 03-23-2007, 10:20 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
That works fine for the root, but it doesn't seem to affect the subfolders.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #4  
Old 03-23-2007, 10:30 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Try to manually enable this option in config_vbseo.php file:
PHP Code:
    define('VBSEO_FORCEHOMEPAGE_ROOT',  1); 
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #5  
Old 03-23-2007, 10:34 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
That option is enabled correctly.

I need to do this with subfolders.

E.g. mysite.com/gallery, mysite.com/links e.t.c.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #6  
Old 03-24-2007, 10:53 AM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Perhaps the simplest way is to modify the links in templates for that.
Otherwise, you can modify "vBSEO Global Hook" plugin in vB admincp by adding the following to it:
PHP Code:
$output str_replace('mysite.com/gallery/index.php''mysite.com/gallery/'$output); 
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #7  
Old 03-24-2007, 11:06 AM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
I see what you mean about the templates, but it's more bookmarks and links on-line that are the issue. Want them all directed to the same folder to preserve PR. I will use the above method, thanks... Is that a 301?

Edit: The above method didn't work. Here is the contents of that plugin.
Quote:
if(@include_once(($GLOBALS['vbpath']?$GLOBALS['vbpath'].'/includes':dirname(__FILE__)).'/functions_vbseo.php'))
$output = make_crawlable($output);
$output = str_replace('dragonninja.co.uk/gallery/index.php', 'dragonninja.co.uk/gallery/', $output);
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #8  
Old 03-24-2007, 04:59 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
Should I just use a stand alone .htaccess in the subfolder? I though the script could do it, but if not that is fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #9  
Old 03-24-2007, 06:18 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Hello,

if you want to redirect the links, you should add the following in root .htaccess rigth after "RewriteEngine on" line:
Code:
RewriteCond %{THE_REQUEST} /index\.php
RewriteRule ^(.+/)index\.php http://www.domain.com/$1 [L,R=301]
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #10  
Old 03-24-2007, 06:25 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
Works like a dream, thanks.

Only issue I can see is that if you go to domain.com/gallery/index.php? you are redirected to domain.com/gallery/? - will this cause problems with PR?

Hope I am not troubling you too much on your weekend!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #11  
Old 03-24-2007, 06:37 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Please try to change rewrite rule to:
Code:
RewriteRule ^(.+/)index\.php http://www.domain.com/$1? [L,R=301]
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #12  
Old 03-24-2007, 07:07 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
Brilliant, thanks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #13  
Old 03-24-2007, 07:51 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
It seems to be killing the vB ACP with an infinate loop. Any way to exclude the folder?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #14  
Old 03-24-2007, 08:01 PM
Oleg Ignatiuk's Avatar
vBSEO Staff
vBSEO Total Customer Support
 
Real Name: Oleg Ignatiuk
Join Date: Jun 2005
Location: Belarus
Posts: 23,637
Add another rewrite condition:
Code:
RewriteCond %{THE_REQUEST} !admincp/
__________________
Oleg Ignatiuk / Crawlability Inc.
vBSEO Styles: Version 1.0 PRO For Everyone Version 2.0 For vBSEO Customers

vBSEO 3.3.0 Gold Released with New "Virtual HTML Display" Feature Available for Download Now

6X Traffic - $1400 in One Day with vBSEO! Max Out Your SEO

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
  #15  
Old 03-24-2007, 08:06 PM
Senior Member
vBSEO Pre-Release Team
 
Real Name: Matthew
Join Date: Nov 2006
Posts: 122
Thanks again.

Realised this is in the wrong forum too, so please feel free to move.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on Facebook!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
vBadvanced index.php rewrite? Phooey Custom Rewrite Rules 2 03-02-2007 10:28 AM
Rewrite vBa static folders and pages eJM Custom Rewrite Rules 3 11-17-2006 06:47 PM
vBSEO 2.0 RC7 Released Juan Muriente vBSEO Announcements 17 09-08-2005 11:00 PM


All times are GMT -4. The time now is 04:16 PM.


Powered by vBulletin Version 3.8.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.0 ©2009, Crawlability, Inc.