Apache detected an error in the Rewrite config

Status
Not open for further replies.

vrarohith39

New Member
Messages
4
Reaction score
0
Points
0
I have some rewrite rules in my .htaccess file. the content of htaccess file is given below.

RewriteEngine On
RewriteRule ^post/([0-9]+)$ disp_post.php?post_id=$1
RewriteRule ^user/([0-9]+)$ user_home.php?user_id=$1
RewriteRule ^([a-zA-Z0-9-/]+)$ commu_home.php?name=$1

It worked successfully on apache installed on my home computer , but its not working when I uploaded that file to my document root. and I got an error message "Apache detected an error in the Rewrite config" while I was trying to enable Hotlink Protection. Please help me to correct it.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
try adding RewriteBase / immediately after RewriteEngine On

If that doesn't work, remove those lines, add in hotlink protection, and then add the lines back afterwards.
 
Status
Not open for further replies.
Top