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
allan1956Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_s_cantaCommented:
Hello,

Try with this code
RewriteEngine on
 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ wpupgrade/$1 [L,QSA]

Open in new window

0
ravenplCommented:
RewriteCond %{HTTP_REFERER} ^/wpupgrade
RewriteRule ^template/screen.css$ wpupgrade/template/screen.css [L]
0
yo_s_cantaCommented:
This will work
RewriteEngine on
RewriteRule ^(.*)$ wpupgrade/$1 [L]
0
allan1956Author Commented:
None of the above seem to do what I wanted.  I also tried placing them and versions of them in the template/ directory

As a not I dont seem to be able to use the RewriteEngine On when I place them in / and i/templates,  generates a server error.  I think rewrite on was done once and it doesnt liek being called more then once?

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.