Bad syntax provided by vbseo

Hi everyone. I really hope somebody will be able to help me, cause I’ve already tried everybody else.

I recently installed VBSeo on my vbulletin forum. On wamp server everything worked perfectly fine, but on hosting there was “internal server error”. Eventually I found what was causing it. The htaccess rewrites.

Here’s the code provided by VBSeo.

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

RewriteCond %{REQUEST_URI} [color=red]!/color
RewriteRule ^((archive/)?(.\.php(/.)?))$ vbseo.php [L,QSA]

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

It worked okay on my local server. On hosting, the exclamation mark had to be changed to “^”. I don’t know why, though, because the code provided by VBSeo seems to be working everywhere except on my hosting.

Now once the “!” was changed to “^”, it started working, but the function “get last post” or “get new post” doesn’t work. The same happens on my local server if I make the same change.

Could anyone explain what is this about and if it’s possible to fix the whole thing? People are complaining to me about it and I can’t do anything.

I found that if I completely remove the following part “!(delfossecp/|delfosse2cp/|cron|vbseo_sitemap)”, then everything works perfectly fine. I just have to leave “^” there.

But my guess is that it must make something work wrong. Can you confirm or deny my suspicion?

Uh sorry, it only works in wamp. Oh hosting it gives “internal server error” again.

I don’t understand why it works somewhere and doesn’t some place else.

Ok, vbseo resolved this problem. Case closed.


Your problem was with the leading / which can only be matched by Apache 1.x.



Just for future reference, any time you get a “Internal Server Error” when playing with a .htaccess file, it means you have a syntax error in there… well, 99% of the time at least. =p

Glad you got it fixed.

Actually it wasn’t a syntax error, vbseo recommended I include another file in the condition with the exclamation point and everything started working as intended. Weird thing. It seems like there’s no real standardization in apache rewrites, their behavior varies a little bit depending on the hosting. Maybe that’s because every hosting has a different version of apache. I don’t know.

That’s kind of true… though not that wildly.

It could be if they had you add a new file that something with their system doesn’t work properly on a Linux host without it.