htaccess conflict

Discussion in 'Apache' started by mrkavin, Feb 9, 2010.

  1. #1
    I have multiple domains running on a single cPanel account, recently I have added some modification code into htaccss which work great for my primary domain(/public_html/), but it affects to all add-on domains(public_html/add-on_domain_folder/), the problem is when calling the add-on domain_folder/ it will fall into the modified rule written in htaccess(line3-6) then it will link to the primary domain, therefore, I would like add the exception for calling the add-on domain (public_html/add-on_domain_folder/ to bypass the modification code or any kind that woulf work.

    could you guys help me out here

    Below is my htaccess detail

    RewriteEngine On

    RewriteRule ^([A-Za-z0-9-]+)[/]*$ shop.php?action=redirect&tag=$1
    RewriteCond %{REQUEST_URI} ^(.*)//(.*)$
    RewriteRule . %1/%2 [R=301,L]

    RewriteRule ^(.*),(.*)$ $2.php?rewrite_params=$1&page_url=$2

    RewriteCond %{QUERY_STRING} base64_encode.*(.*) [OR]
    RewriteCond %{QUERY_STRING} (<|%3C).*script.*(>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|[|%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|[|%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]
     
    mrkavin, Feb 9, 2010 IP