pathing to assets not working using rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux