vBulletin Search Engine Optimization
|
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 ...
| |||||||
|
#1
| |||
| |||
| 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. |
|
#2
| ||||
| ||||
|
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 |
|
#3
| |||
| |||
|
That works fine for the root, but it doesn't seem to affect the subfolders.
|
|
#4
| ||||
| ||||
|
Try to manually enable this option in config_vbseo.php file: PHP Code:
__________________ 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 |
|
#5
| |||
| |||
|
That option is enabled correctly. I need to do this with subfolders. E.g. mysite.com/gallery, mysite.com/links e.t.c. |
|
#6
| ||||
| ||||
|
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:
__________________ 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 |
|
#7
| |||
| |||
|
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:
|
|
#8
| |||
| |||
|
Should I just use a stand alone .htaccess in the subfolder? I though the script could do it, but if not that is fine. |
|
#9
| ||||
| ||||
|
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 |
|
#10
| |||
| |||
|
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! |
|
#11
| ||||
| ||||
|
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 |
|
#12
| |||
| |||
|
Brilliant, thanks.
|
|
#13
| |||
| |||
|
It seems to be killing the vB ACP with an infinate loop. Any way to exclude the folder?
|
|
#14
| ||||
| ||||
|
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 |
|
#15
| |||
| |||
|
Thanks again. Realised this is in the wrong forum too, so please feel free to move. |
| Thread Tools | |
| |
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 |