allan1956
asked on
Help with mod Rewrite
need some redirection help for a testing platform/subdirectory on a production box
In the root document directory:
I have html pages that have a link to a css file
<link href="/template/screen.css " ...
I want to move a copy of these html files to the directory wpupgrade
so Ill be testing at http://www.mysite.org/wpupgrade/file.html
Is it possible to use an .htaccess set up to that html files in the wpupgrade directory actually pull the css info from wpupgrade/template/screen. css???
I have lots of html files and would rather not have to 'touch' each one of them to repoint them
something like
condition /template/screen.css
contition (http_referer) /wpupgrade (something which only affects html files in the wpupgrade directory and has no affect on files in the root directory)
rewrite /wpupgrade/template/screen .css
In the root document directory:
I have html pages that have a link to a css file
<link href="/template/screen.css
I want to move a copy of these html files to the directory wpupgrade
so Ill be testing at http://www.mysite.org/wpupgrade/file.html
Is it possible to use an .htaccess set up to that html files in the wpupgrade directory actually pull the css info from wpupgrade/template/screen.
I have lots of html files and would rather not have to 'touch' each one of them to repoint them
something like
condition /template/screen.css
contition (http_referer) /wpupgrade (something which only affects html files in the wpupgrade directory and has no affect on files in the root directory)
rewrite /wpupgrade/template/screen
RewriteCond %{HTTP_REFERER} ^/wpupgrade
RewriteRule ^template/screen.css$ wpupgrade/template/screen. css [L]
RewriteRule ^template/screen.css$ wpupgrade/template/screen.
This will work
RewriteEngine on
RewriteRule ^(.*)$ wpupgrade/$1 [L]
RewriteEngine on
RewriteRule ^(.*)$ wpupgrade/$1 [L]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try with this code
Open in new window