0

I have .htaccess rewrite rules in my root folder and it's causing every folder to act as a vanity URL, how can I stop that?

RewriteEngine On
RewriteBase /
RewriteRule ^([a-zA-Z0-9:_-]+)/$ index.php?p=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9:_-]+)$ index.php?p=$1 [L,QSA]
RewriteRule ^([a-zA-Z0-9:_-]+)/([a-zA-Z0-9:_-]+)$ index.php?p=$1&s=$2 [L,QSA]
RewriteRule ^([a-zA-Z0-9:_-]+)/([a-zA-Z0-9:_-]+)/$ index.php?p=$1&s=$2 [L,QSA]

Example:

I have my standard include files in /pages/

But in /billing I have WHMCS for payment things, upon going to /billing my RewriteRules will catch /billing as trying to access a page and will send me to a 404 which is handled by my index.php, in short, how do I ignore other folders with index's?

Rbn
  • 381
  • 2
  • 4
  • 11
  • Why are you having the rules twice? – Kneel-Before-ZOD Sep 16 '13 at 03:50
  • If there exist an `index.php` file in the current directory you do not want to do the redirect. Is that correct? If you just want to remove it the redirect, remove `.htaccess` or do `RewriteEngine Off`. But I guess that is a bit too easy and you really want to do something else. :) – Qben Sep 16 '13 at 12:02

0 Answers0