Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Below is my .htaccess file for my website on shared hosting - I'm attempting to send all requests to index.php with parameter 'q' where I wish to parse data etc... unless it's an existing file or directory.

So my issue, if I attempt to browse to an actual directory expecting to get an unauthorized notice (options -Indexes) it sends me to my index.php and I also noticed that print_r($_GET) it gives me this: Array ( [q] => 403.shtml )

AddDefaultCharset UTF-8
Options -Indexes +FollowSymLinks

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

</IfModule>

Help would be much appreciated if possible :)

share|improve this question
add comment

1 Answer 1

OP incorrectly answered her own question:

This ended up being an issue with mod_security on my shared hosting environment. My hosting provider whitelisted the domain against the rules being triggered by mod_security, problem solved.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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