0 Replies Latest reply on Feb 25, 2013 1:29 PM by pensacolawebdesign

    htaccess mod rewrite still serving root files for subsite

    pensacolawebdesign

      I am trying to set up my local dev enviroment as close to the live server(cf 9 advanced on newtek) as possible.

       

       

      I would like to host a site from a subdirectory and have made the proper .htaccess entries as required.

       

       

      Live server:

       

       

      RewriteEngine On

       

      RewriteCond %{HTTP_HOST} mysite\.com [NC]

      RewriteCond %{REQUEST_URI} !^/site_mysite_com/ [NC]

      RewriteRule (.*) /site_mysite_com/$1 [L]

       

      RewriteCond %{REQUEST_URI} ^/site_mysite_com/ [NC]

      RewriteCond %{HTTP_HOST} !mysite\.com [NC]

      RewriteRule . http://%{HTTP_HOST}/ [R=301,L]

       

       

      dev:

       

       

      RewriteEngine On

       

      RewriteCond %{HTTP_HOST} mysitedotcom [NC]

      RewriteCond %{REQUEST_URI} !^/site_mysite_com/ [NC]

      RewriteRule (.*) /site_mysite_com/$1 [L]

       

      RewriteCond %{REQUEST_URI} ^/site_mysite_com/ [NC]

      RewriteCond %{HTTP_HOST} !mysitedotcom [NC]

      RewriteRule . http://%{HTTP_HOST}/ [R=301,L]

       

       

      I am having an issue with CF running the top level index.cfm and Application.cfc when I want it to run /site_mysite_com/index.cfm and Application.cfc.  Why isn't the mod rewrite redirecting requests there?