i have this url that i wanted to make friendly, using rewrite on .htacess but it gives me an error(500 internal server error), this is my orginal php url
http://www.example.com/viewtopic.php?topic=lovetopic
i want to change it to this:
http://www.example.com/lovetopic
this is my whole htaccess code is this:
RewriteEngine On
RewriteRule ^user/([^/]*)$ /viewprofile.php?user=$1 [L]
RewriteRule ^([^/]*)$ /viewtopic.php?topic=$1 [L]
i dont know what the problem is
EDIT the server error log is giving me this error
[Thu Oct 14 20:34:36 2010] [error] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.,
The pattern of your second rule
^([^/]*)$does also match/viewtopic.phpwithout the path prefix/, i.e.viewtopic.php. That’s why you’re having an infinite recursion.You can use the following condition to exclude that:
Or use this condition to exclude all existing files:
Or use this rule in front of you other rules to stop every request that can be mapped to an existing file being rewritten by any following rules: