1

After phpmyadmin login, I get this error message

Error in Processing Request
Error: 403
Error text: Forbidden"

I found that removing the following lines from .htaccess it doesn't give any error

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} (\"|%22).*(<|>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3) [NC,OR]
RewriteCond %{QUERY_STRING} (\\|\.\./|`|=\'$|=%27$) [NC,OR]
RewriteCond %{QUERY_STRING} (\;|\'|\"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR]
RewriteCond %{QUERY_STRING} (base64_encode|localhost|mosconfig) [NC,OR]
RewriteCond %{QUERY_STRING} (boot\.ini|echo.*kae|etc/passwd) [NC,OR]
RewriteCond %{QUERY_STRING} (GLOBALS|REQUEST)(=|\[|%) [NC]
RewriteRule .* - [F]

I already tried comment out the RewriteCond % lines 1 by 1 to isolate the exact line, but nothing happens unless I remove the entire block. Is there any way to fix it?

  • Administration panels are off-topic on Server Fault. – HopelessN00b Feb 22 '15 at 1:52
1

If you're using Apache 2.2 (you haven't specified), add this temporarily to your Virtual Host (or httpd.conf) configuration:

RewriteLog /tmp/rewrite.log
RewriteLogLevel 3

Then restart Apache and access the page then generates this error again. You can then trace the output in /tmp/rewrite.log to see which pattern exactly is being matched and resulting in the 403.

| improve this answer | |
  • I'm using Apache 2.2.15, I have added 'RewriteLog /tmp/rewrite.log RewriteLogLevel 3' to the end of '/etc/httpd/conf/httpd.conf', restarted apache and checked '/tmp/rewrite.log', but the file is empty 0kb – e8dev Jan 6 '15 at 23:42

Not the answer you're looking for? Browse other questions tagged or ask your own question.