tags:

views:

356

answers:

1

I recently changed the directory to one of my websites and wrote a rule within the htaccess file to handle the redirect. However, the css and images fail to load now.

Options -Indexes
Options +FollowSymLinks

RewriteEngine On
RewriteBase /
RewriteRule ^(\.*)$ http://www.myDomain.com/temp_site/$1 [R=301,L]

EDIT:

Some of the files that don't work are

http://www.myDomain.com/css/style.css
http://www.myDomain.com/images/me.jpg
http://www.myDomain.com/about.php

A: 

Try this rule:

RewriteRule !^temp_site/ /temp_site%{REQUEST_URI} [R=301,L]
Gumbo
This is close, but the url is now...http://www.mydomain.com/temp_site/myPage.htmanyway I can get www.mydomain.com/myPage.htm
Scott
Got the desired affect by removing the R=301.Thanks
Scott