.htaccess not working in subfolder
I have a couple of sites that are currently under development and I've put them under a specific subfolder for clients/co-workers to view - "http://dev.staffanestberg.com/site-name/". I've run into some problems getting the sites working with .h开发者_Python百科taccess. I can reach the index page by typing in the url for a site folder but neither img/style/js/etc linking or page rewriting works. Looking for a solution to this, Apache's "RewriteBase" seems to be the most likely one, however I can't get it to work. Tried RewriteBase http://dev.staffanestberg.com/site-name/ RewriteBase /site-name What would be the correct method?
Thanks in advance, -Staffan
mod_rewrite’s RewriteBase
directive does only apply to rewrites using RewriteRule
. And that does only apply for requests that are sent to the server.
But if the requested URIs are already wrong, RewriteBase
doesn’t do any help. What you could try instead is the HTML element BASE
that set’s the base URI for the current document.
精彩评论