Page 1 of 1

mod-rewrite

Posted: Tue Dec 22, 2009 2:42 pm
by psychotomus
I am working on a project where almost every page needs to used mod-rewrite. after filling in the form http://rpg.antgaming.com and i hit submit i get this:

Code: Select all

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
 
Please contact the server administrator, webmaster@rpg.antgaming.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
 
More information about this error may be available in the server error log.
 
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
 
 
--------------------------------------------------------------------------------
 
Apache/2.2.8 (Unix) mod_ssl/2.2.8 OpenSSL/0.9.8e-fips-rhel5 DAV/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at rpg.antgaming.com Port 80



my mod-rewrite code is this:

Code: Select all

RewriteEngine On
 
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png|avi|zip|mp3|midi)$ /images/nohotlink.jpe [L]
 
RewriteRule ^game/(.*)/crimes$ /crimes.php?game=$1 [NC,L]
RewriteRule ^game/(.*)/estates$ /estates.php?game=$1 [NC,L]
RewriteRule ^game/(.*)/invetory$ /inventory.php?game=$1 [NC,L]
RewriteRule ^game/(.*)/shop$ /shop.php?game=$1 [NC,L]
RewriteRule ^game/(.*)/train$ /train.php?game=$1 [NC,L]
RewriteRule ^game/(.*)/userlist$ /userlist.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/crimegroupadd$ /admin/crimegroupadd.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/crimegroupmanage$ /admin/crimegroupmanage.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/crimeadd$ /admin/crimeadd.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/crimemanage$ /admin/crimemanage.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/estateadd$ /admin/estateadd.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/estatemanage$ /admin/estatemanage.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/newsadd$ /admin/newsadd.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/newsmanage$ /admin/newsmanage.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/itemadd$ /admin/itemadd.php?game=$1 [NC,L]
RewriteRule ^game/admin/(.*)/itemmanage$ /admin/itemmanage.php?game=$1 [NC,L]
 
ErrorDocument 404 /404.php
php_value session.gc_maxlifetime 14400
how can i stop this from happening?

Re: mod-rewrite

Posted: Fri Dec 25, 2009 6:22 pm
by Darhazer
First try to remove the php_value and refresh
If doesn't help, try commenting line by line each rule, until you find which one causes the error.

Re: mod-rewrite

Posted: Fri Dec 25, 2009 7:39 pm
by psychotomus
hehe. that worked for the most part

I added a new line
RewriteRule ^game/(.*)/$ /gamefiles/index.php?game=$1 [NC,L]

and get the following error
Not Found
The requested URL /game/Demo/ was not found on this server.
how I fix this? all mod-rewrites work but this one.