httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Smith <>
Subject [users@httpd] pathing to assets not working using rewrite
Date Mon, 25 Feb 2013 00:39:07 GMT
I am trying to serve a secondary site from a subdirectory on my local

Here is my htaccess:

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]

The page is coming up, but assets like the css and images are not working
when they were before(this is a fresh install of apache).

so I cannot get this to load in the html:

but this works:

Any ideas what I am doing wrong?  I thought the point of the rewrite was to
redirect requests to the proper subdirectory.  I'm not sure if my htaccess
is correct; I used my host's generator for it.  It is working on the live

Thank you.

View raw message