Waflix Posted April 19, 2012 Posted April 19, 2012 I have some problems with my .htaccess file. I've tried placing the .htaccess file in my very root and in the folder I actually want it in, but I keep getting a 500 error. Once I delete the file the problem is gone. This is the piece of code I'm using:--Options +FollowSymlinksRewriteEngine onRewriteRule ^edit/([^/]+)/([^/]+) /edit.php?cat=$1&id=$2 [NC]-- And I've also tried this:--RewriteEngine onRewriteRule ^edit/([^/]+)/([^/]+) /edit.php?cat=$1&id=$2 [NC]-- Is this just an error in my script, is this functions turned off somehow, or... could anyone help me? Quote
anush Posted April 21, 2012 Posted April 21, 2012 What do you actually need to do, if you can describe that i can solve the problem for you after this month as i have exams till 29th. Quote
Waflix Posted April 22, 2012 Author Posted April 22, 2012 I want to rewrite '/edit.php?cat=reactions&id=1' and '/edit.php?cat=topics&id=84' to '/edit/reactions/1' and '/edit/topics/84'. But whenever I try achieving this with an .htaccess file, I get an Internal Server Error. Quote
Piotr GRD Posted April 22, 2012 Posted April 22, 2012 Error 500 very often mean that there is syntax error in the .htaccess file. First thing I recommend you to check is the way you are saving this file. Use pure ascii only, do NOT save it using UTF-8 or Unicode etc., non-ascii characters such as in example BOM (byte order mark) may result with syntax error. After you'll resolve your issue with error 500, remember that when being on a virtual host you have to provide RewriteBase when using mod_rewrite. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.