![]() |
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 |
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. |
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 |
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 |
Quote:
|
Maybe 404 is caused by the error in rewrite rule? that rule does not get in.
|
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 |
i switch back to apache 2 and the random 404 went away, no problem at all.
any other pointer? thanks |
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? |
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. |