PDA

View Full Version : Something wrong with these .htaccess rewrite rules?


Max Taxable
04-11-2014, 01:34 AM
When i install this in my .htaccess file the site kicks the "Internal Server Error" page. Even if that is all that is in the file. What's wrong?

RewriteEngine On

# If you are having problem with "None Could Be Negotiated" errors in Apache, uncomment this to turn off MultiViews
# Options -MultiViews

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

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

ForceHSS
04-11-2014, 02:35 AM
Have you not renamed the admincp or modcp folders in ur ftp?

Max Taxable
04-11-2014, 02:35 AM
No, no renamed folders.

Zachery
04-11-2014, 02:50 AM
If you remove just the rewrite rules, or comment them out? What then?

Max Taxable
04-11-2014, 02:52 AM
If you remove just the rewrite rules, or comment them out? What then?Everything is golden but the DBSEO of course doesn't work - all links become 404s.

Max Taxable
04-11-2014, 02:54 AM
I was just seeing if anyone could see anything wrong with the rewrite rules, if not it means something particular to the site I am trying this on, is amiss.

Zachery
04-11-2014, 03:03 AM
Add the first set of rules:

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

Then see iof the ISE keeps up.

Max Taxable
04-11-2014, 03:18 AM
No joy.Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator and inform them of the time the error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

ForceHSS
04-11-2014, 04:31 AM
And what error does it show in the server log

Zachery
04-11-2014, 04:32 AM
Something should have went into your error logs, or at least the system error logs.

Your webhost should be able to pull more correct logs for you.

Is this the free version or paid version of DBSEO?

Disco_Dave
04-11-2014, 08:19 AM
Is your forum within a forums folder?

Max Taxable
04-11-2014, 01:36 PM
Is this the free version or paid version of DBSEO?The free, "Lite" version. I have it running without much hitch on two other of my sites.Is your forum within a forums folder?Now that's a interesting question because technically I suppose it is. The domain points to a folder in the file manager but the folder name isn't part of the URL. This might possibly cause a problem with rewrite rules, although for years i have successfully had the forced www rewrite rule in effect with no issues.

Max Taxable
04-11-2014, 01:37 PM
Thanks for all the help and suggestions/questions fellas. It's good to be on the receiving end of help from here every now and then!:D

Zachery
04-11-2014, 01:49 PM
Did your webhost reveal anything ?

Disco_Dave
04-11-2014, 01:55 PM
The free, "Lite" version. I have it running without much hitch on two other of my sites.Now that's a interesting question because technically I suppose it is. The domain points to a folder in the file manager but the folder name isn't part of the URL. This might possibly cause a problem with rewrite rules, although for years i have successfully had the forced www rewrite rule in effect with no issues.


I also had our forum in a forums folder and DBSEO would not work for us also, I ended up moving the forum into the root, and everything worked 100% after that.

Max Taxable
04-11-2014, 01:57 PM
Did your webhost reveal anything ?I didn't check server logs yet but I will, thanks.I also had our forum in a forums folder and DBSEO would not work for us also, I ended up moving the forum into the root, and everything worked 100% after that. It seems to work just fine, just the .htaccess rewrite rules kicking the ISE error. Is that what you were having?

Without the rules, the DBSEO works just fine except of course, all internal links generate 404s.

Disco_Dave
04-11-2014, 02:04 PM
This may help youhttps://vborg.vbsupport.ru/showthread.php?t=309693

Which of these settings do you have set to in the dbseo-cp

[forum_id]
[forum_title]
forum[forum_id]

I had to set all mine to forum_id before it worked

Max Taxable
04-11-2014, 02:08 PM
This may help youhttps://vborg.vbsupport.ru/showthread.php?t=309693

Which of these settings do you have set to in the dbseo-cp

[forum_id]
[forum_title]
forum[forum_id]

I had to set all mine to forum_id before it workedHmm this was with or without the forum folder?

You put the forum on root, AND used forum ID number? I much prefer the titles than the numbers and have the settings for titles, throughout..

I should mention I am using vB 3.8.7

Disco_Dave
04-11-2014, 02:12 PM
After I had moved out of the forums folder, before in the forums folder I could not get the add-on to work at all. Afterwards I had to set all the settings to forum_id to stop all the 404's

I'm using 4.2.2

Max Taxable
04-11-2014, 02:32 PM
After I had moved out of the forums folder, before in the forums folder I could not get the add-on to work at all. Afterwards I had to set all the settings to forum_id to stop all the 404's

I'm using 4.2.2I had a similar issue on some URLs on a 3.8.7, turned out it was the settings in the stopwords for DBSEO which were generating the 404s. Some of the definitions such as the words 'and' 'or' etc.

I have DBSEO installed and working exactly the way I want it to on two other 3.8.7 installations. Only on this latest one am I experiencing the issue with the .htaccess.

Disco_Dave
04-11-2014, 02:35 PM
Mite be best if you ask over at DBTech, I was just giving me experience with installing this mod....Good luck and keep us posted :D

Max Taxable
04-11-2014, 02:37 PM
Mite be best if you ask over at DBTech, I was just giving me experience with installing this mod....Good luck and keep us posted :DYeah it might be but I refuse to join a site just to get support for mods posted here on this site. Post it here, support it here. I made a post in their thread, it will be a week before they see it.

Disco_Dave
04-11-2014, 02:39 PM
That's the nature of the beast :D when you get something for free ;)

Max Taxable
04-11-2014, 02:45 PM
That's the nature of the beast :D when you get something for free ;)Nah. Most every other developer supports its mods here and in a timely manner.

Zachery
04-11-2014, 09:40 PM
The issue here is prettly clearly any rewrite rules causing an internal server error. We need to figure out what that internal server error is before we can pass any blame.

Max Taxable
04-11-2014, 09:47 PM
The issue here is prettly clearly any rewrite rules causing an internal server error. We need to figure out what that internal server error is before we can pass any blame.Too true. My faint hope was there might be something wrong with the rules I was using.

Simon Lloyd
04-12-2014, 05:11 AM
if i was you i'd drop a pm to ikopylov he's brilliant at .htaccess, he's not free but very very reasonable, he sorted out all my issues when removing vbseo!