vBulletin Search Engine Optimization
This is a discussion on VBSEO on the same level as forums directory within the Troubleshooting forums, part of the vBSEO SEO Plugin category; Hello, I'm going to implement vbseo outside of forums URL. Instead in web root directory, I'm going to implement in ...
| |||||||
Enhancing 80 million pages. | Register | FAQ | Members List | Social Groups | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| VBSEO on the same level as forums directory
Hello, I'm going to implement vbseo outside of forums URL. Instead in web root directory, I'm going to implement in a subfolder under web root (same level as forums directory). Is this possible? If yes, how can I achieve that? Here's the details: vBulletin root is on root/forums Custom scripts root is on root/scripts Here's CRR entries: Code: '^customscript\.php\?cat1=(\d+)&cat2=(\d+)&cat3=(\d+)$' => 'showcat/$1/$2/$3/' '^customscript\.php\?cat1=(\d+)&cat2=(\d+)$' => 'showcat/$1/$2/' Here's .htaccess (on forums folder): Code: # Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the vBSEO control panel to stop url rewrites.
RewriteEngine On
# Some servers require the Rewritebase directive to be
# enabled (remove '#' at the beginning to activate)
# Please note: when enabled, you must include the path
# to your root vB folder (i.e. RewriteBase /forums)
#RewriteBase /
#RewriteCond %{HTTP_HOST} !^www\.makeuptalk\.com
#RewriteRule (.*) http://www.makeuptalk/forums/$1 [L,R=301]
#RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} (admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.*)$ $1 [L]
RewriteCond %{REQUEST_FILENAME}index\.php -f
RewriteRule ^(.*)$ $1index.php [L]
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !chat
RewriteRule ^(.*\.php)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
RewriteRule ^$ vbseo.php?vbseourl=index.php [L]
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1&%{QUERY_STRING} [L]
Here's .htaccess (on web root): Code: RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !forums/
RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
RewriteCond %{REQUEST_FILENAME} !forums/
RewriteRule ^(.*.php)$ forums/vbseo.php?vbseourl=$1&vbseorelpath=../&%{QUERY_STRING} [L]
In customscript.php: These two are in the same files, it's just used to show 2-levels or 3-levels categories. Code: $seourl = vbseo_any_url("customscript.php?cat1=$cat1&cat2=$cat2"); //For two levels categories
$seo_title = vbseo_filter_text($catname);
<a href=\"$seourl$seo_title.html\">$catname</a> // This will produce this link: http://www.mydomain.com/scripts/showcat/1/2/category-name.html
Code: $seourl = vbseo_any_url("customscript.php?cat1=$cat1&cat2=$cat2&cat3=$cat3"); //For three levels categories
$seo_title = vbseo_filter_text($catname);
<a href=\"$seourl$seo_title.html\">$catname</a> // This will produce this link: http://www.mydomain.com/scripts/showcat/1/2/3/category-name.html
The page get redirected but it's not correct. Accessing directly from this url works correctly: Code: http://www.mydomain.com/forums/vbseo.php?vbseourl=scripts/customscript.php&vbseorelpath=../&cat1=1&cat2=2 Thanks
__________________ www.MakeupTalk.com 1.2 million posts! |
|
#2
| ||||
| ||||
|
In case if you want to rewrite another subfolder "foldername/" (not domain root), .htaccess should be: Code: RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ../forums/vbseo.php?vbseourl=$1&vbseorelpath=../foldername/&%{QUERY_STRING} [L]
RewriteRule ^(.*\.php)$ ../forums/vbseo.php?vbseourl=$1&vbseorelpath=../foldername/&%{QUERY_STRING} [L]
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#3
| |||
| |||
|
Hi Oleg, I've tried your .htaccess but got Error 400 when applied to web root .htaccess. And ot Error 404 when applied to "foldername/". Where should I put the .htaccess? And should I remove others .htaccess? That means for each subfolder we want to use vbseo on, we have to create each RewriteRule for each subfolder? Is there a global RewriteRule for it? So we don't have to create that many .htaccess Thanks |
|
#4
| ||||
| ||||
|
You should put this .htaccess in "foldername/" (and remove .htacess from the domain root).
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
|
#5
| |||
| |||
|
It's not working. It gets redirected to forums directory. |
|
#6
| ||||
| ||||
|
What is an example URL for that?
__________________ Oleg Ignatiuk / Crawlability Inc. Support Team Launches New DeskPro Powered Tool Enhanced Support at Your Service vBSEO 3.2.0 Launched - Maximum Overdrive for Your Web Traffic! Over 100 Instant SEO Optimizations 6X Traffic - $1400 in One Day with vBSEO! Imagine What the vBSEO Patent Pending Technology Can Do For You. |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| vBSEO 2.0 RC7 Released | Juan Muriente | vBSEO Announcements | 17 | 09-09-2005 12:00 AM |