How can I redirect paths with a leading '/' to a folder instead of root?
I recently took over a website that has all kinds of include files. My problem is that I want to run this site locally from within a folder like so.
But all the links begin with '/' so that when a template is included with say a linked css file
ex. <link rel="stylesheet" type="text/css" href="/viacom_news.css">
it correctly looks in the htdocs root folder but I need to look in root/mywebsite folder.
I don't want to edit all those links as they work on the real server. Can this be overridden with a htaccess file some how? My attempts have all failed.
- Code: Select all
RewriteRule ^rewritetest/(.*) mywebsite/$1
Thanks so much for any suggestions.