LiteSpeed Support Forums

LiteSpeed Support Forums (http://www.litespeedtech.com/support/forum/index.php)
-   Bug Reports (http://www.litespeedtech.com/support/forum/forumdisplay.php?f=9)
-   -   random 404 on mod_rewrite (http://www.litespeedtech.com/support/forum/showthread.php?t=1077)

piper 06-01-2007 07:03 PM

random 404 on mod_rewrite
 
Hi,

I Run a wordpress site with mod_rewrite and it's installed on the root folder

in subfolder i have a forum application and it has it's own htaccess for mod_rewrite

It works but randomly gives 404 on the forum

This is what the server have

Litespeed Enterprise 3.11, PHP 5.2.2, LSPHP 4.0

Htaccess is

RewriteEngine On
RewriteRule ^index\.html$ ./index.php?mdrw=on
RewriteRule ^manual\.html$ ./index.php?action=manual&mdrw=on
RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3 &mdrw=on
RewriteRule ^([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vtopic&forum=$1&page=$2&mdrw=on


Any help?

Thanks in advanced

mistwang 06-01-2007 09:24 PM

Are there rewrite rules in .htaccess of the root folder?

Random error is hard to debug, and we need at least some debug log for request results in 404, with rewrite log enabled, in order to look it further. It might have something to do with htaccess cache updating.
Is that possible to generate some debug log for analysis?

One possible fix is to create a static context for the forum, and move the rewrite rule from .htaccess to the context level configuration, without changing the rewrite rules. But, if the random 404 is cause by a bug in htaccess handle, the bug will remain there.

piper 06-01-2007 10:32 PM

i got this error

[config:vhost:gear:context:/forums/] rewrite: invalid third parameter, '[' is expected while parsing: RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3 &mdrw=on

piper 06-01-2007 10:48 PM

Can you guide me on how to make static context?

the forum folder is at /home/user/gear/forums

goes to /forums/

(i tried creating static but dont know about the setting)

Thanks

mistwang 06-02-2007 07:46 AM

Quote:

Originally Posted by piper (Post 5204)
i got this error

[config:vhost:gear:context:/forums/] rewrite: invalid third parameter, '[' is expected while parsing: RewriteRule ^([0-9]+)_([0-9]+)_([-0-9]+)\.html$ ./index.php?action=vthread&forum=$1&topic=$2&page=$3 &mdrw=on

There is a space in between "...&page=$3 &mdrw=on".

mistwang 06-02-2007 07:47 AM

Maybe 404 is caused by the error in rewrite rule? that rule does not get in.

piper 06-02-2007 08:55 AM

hmm i'm not sure since it only happend randomly, if i refresh the page after 404 it shows up fine

can you guide me on how to create static context with the mod_rewrite rule? i still dont get how it works :p

piper 06-02-2007 09:32 AM

i switch back to apache 2 and the random 404 went away, no problem at all.

any other pointer? thanks

mistwang 06-02-2007 10:12 AM

If you are using LiteSpeed + hosting control panel, you maybe not able to add static context, as the site is configured through Apache httpd.conf. It will need your assist if it is caused by a bug.

How often does it happen?

piper 06-02-2007 11:01 AM

every 20-30 clicks on different url of the mod_rewrite

i'm ready to assist :)

the forum is located here

http://www.myitablet.com/talk/

to reproduce just surf around the forum (browsing forum categories and forum topics back and forth) after 20-30 clicks it will give 404 error


All times are GMT -7. The time now is 08:51 AM.