mod-rewrite

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

mod-rewrite

Post 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?
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: mod-rewrite

Post 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.
psychotomus
Forum Contributor
Posts: 487
Joined: Fri Jul 11, 2003 1:59 am

Re: mod-rewrite

Post 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.
Post Reply