Rewriting URLs vBSEO

Agent

New Member
I am currently trying to install vBSEO for my site. I uploaded all the upload files, uploaded .htaccess. to my forum's root and installed the product and everything works in my ACP. However, when I turn it on, the rewritten URLs on my forum does not work. Could anyone give me suggestions to how to fix this?

My .htaccess. file look like this (I just removed my real site name in this example):

# Comment the following line (add '#' at the beginning)
# to disable mod_rewrite functions.
# Please note: you still need to disable the hack in
# the x2YZSEO 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\.mysite\.co.cc
RewriteEngine On
RewriteRule (.*) http://www.mysite.co.cc/$1 [L,R=301]
RewriteEngine On

RewriteCond %{QUERY_STRING} !vbseourl=
RewriteCond %{REQUEST_URI} !(admincp/|modcp/|chat|cron)
RewriteRule ^(.*\.php(/.*)?)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !\.(jpg|gif)$
RewriteRule ^(archive/.*)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ vbseo.php?vbseourl=$1 [L,QSA]

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
 

Grinderhand

New Member
Agent said:
#RewriteCond %{HTTP_HOST} !^www\.mysite\.co.cc
#RewriteEngine On
#RewriteRule (.*) http://www.mysite.co.cc/$1 [L,R=301]
RewriteEngine On

Try commenting out the above three lines above and see if that helps.
 

Agent

New Member
Grinderhand said:
Try commenting out the above three lines above and see if that helps.
Thanks for the suggestion but unfortunately it did not work. Any other ideas anyone?
 

Grinderhand

New Member
Question: Are you using a front-end to vB, such as vBAdvanced or vBCMPS?

Also, the commented lines make mention of x2YZSEO, but the actual rewrite line specifies vbseo and vbseo_sitemap. Are you using the customized version found here with renamed files or the standard version?
 

Agent

New Member
Grinderhand said:
Question: Are you using a front-end to vB, such as vBAdvanced or vBCMPS?

Also, the commented lines make mention of x2YZSEO, but the actual rewrite line specifies vbseo and vbseo_sitemap. Are you using the customized version found here with renamed files or the standard version?

I am not using any of those, just a normal vBulletin at the moment.

I am using Mr. X's custom version of Draxofavalon's vBSEO 3.2.0.
 

Grinderhand

New Member
Ah, that explains your problem. Try using this for your .htaccess.

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 x2YZSEO 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\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ x2yzseo_sitemap/x2yzseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron)
RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ x2yzseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ x2yzseo.php [L,QSA]
 

Agent

New Member
Grinderhand said:
Ah, that explains your problem. Try using this for your .htaccess.

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 x2YZSEO 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/)
[b]#RewriteBase /

#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301][/b]

RewriteRule ^((urllist|sitemap).*\.(xml|txt)(\.gz)?)$ x2yzseo_sitemap/x2yzseo_getsitemap.php?sitemap=$1 [L]

RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron)
RewriteRule ^((archive/)?(.*\.php(/.*)?)?)$ x2yzseo.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(admincp|modcp|clientscript|cpstyles|images)/
RewriteRule ^(.+)$ x2yzseo.php [L,QSA]

So I removed the #'s, renamed the links, uploaded it, changed the name file to ".htaccess.". I am not sure what I am doing wrong but every time I click a sub-forum it does not work (they have all been renamed since using this code).
 

Grinderhand

New Member
When you say "it does not work", what exactly is happening? Are you getting an error message of any kind? Check your cPanel error log - that might give a clue. And what lines did you uncomment? You should have been able to use that file exactly as written.
 

Agent

New Member
Grinderhand said:
When you say "it does not work", what exactly is happening? Are you getting an error message of any kind? Check your cPanel error log - that might give a clue. And what lines did you uncomment? You should have been able to use that file exactly as written.

Well I tried it again with exactly how you written it but still no luck. At first, I removed the # from the lines and also changed the part where it says "yourdomain" to what my website name is:

#RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
#RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

I am not getting an error message, the forum I wish to under just does not show up. I am just redirected to my homepage even though the link says "http://____.co.cc/index.php/announcements/" when I click the "Announcements" subforum.
 

Grinderhand

New Member
If that's the case, maybe we're just beating our head against the wall. In my case, I took Draxo's version and did the same thing Mr. X did to his release and it works like a charm. I haven't checked the X version, but maybe he missed something critical.
 

Grinderhand

New Member
I think I found an error in Mr. X's version. Try renaming the seoajx.js file found in the clientscript directory to x2yzseo_ajax.js and see if thst cures the problem.
 

Agent

New Member
Grinderhand said:
I think I found an error in Mr. X's version. Try renaming the seoajx.js file found in the clientscript directory to x2yzseo_ajax.js and see if thst cures the problem.

I tried this as well, still no luck. I've been wasting too much time with this, I guess I will try another release of vBSEO.
 

Curtis129

New Member
i had a simlar issue but instead it gave me 404 errors and 500 internal errors,

i think you will find yur issue can be fixed if you rename the file

.htaccess without the following "."

so the file name is ".htaccess" and thats it
 

Agent

New Member
Curtis129 said:
i had a simlar issue but instead it gave me 404 errors and 500 internal errors,

i think you will find yur issue can be fixed if you rename the file

.htaccess without the following "."

so the file name is ".htaccess" and thats it

I just tried that and now I am getting "Page not found" messages.
 

Agent

New Member
Actually, it worked pretty well after I editted some settings in the cPanel. However, none of my forum images are showing up now. Any suggestions or tips how to get them back?
 

Agent

New Member
Curtis129 said:
i had same issue!!!

you need to add the "$1" at the end yourdomain of where it says

RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]

note the $1 at the end, that should fix that issue

I always had the $1 in my htaccess file, so it is not the cause of my problem. I realize that my path for my images are coming from http://www.____.co.cc/index.php/images/ instead of what I defined in my style, which is http://www.____.co.cc/images

Any ideas on how would I remove the index.php part from the image's path?
 
Top