On 2/24/2013 7:39 PM, Matthew Smith wrote:
> I am trying to serve a secondary site from a subdirectory on my local
> server.
> 
> 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:
> /css/style.css
> 
> but this works:
> /site_mysite_com/css/style.css
> 
> 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 site.
> 
> Thank you.
> 

Are you trying to set this up on a server that you control completely
(e.g., your home desktop computer)? Or on an off-the-shelf hosted
solution of some kind (e.g., the "live site" you mentioned)?

Because to what degree you have control over the Apache configuration
dictates the approach you should take.

-Ben

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to