Forum Moderators: phranque

Message Too Old, No Replies

htaccess and image problem

         

gohammers

8:32 am on Jun 22, 2010 (gmt 0)

10+ Year Member



Hi,

I'm working with a site and while I'm doing it I want all the visitors to be sent to a temporary folder. I have done that all traffic will go to the folder apart from my own IP number (111.111.111.111). I have done as follows:

RewriteCond %{REMOTE_HOST} !^111\.111\.111\.111
RewriteCond %{REQUEST_URI} !/temp/index\.html$
RewriteRule .* /temp/index.html [R=302,L]

In the temporary folder, I have an index-file with information that the page is under construction and an image. The problem is that when I do this the image can not display on the temporary side. The path to the image (which is placed in the same temporary folder as the index file) is correct. What can this be? Something more that have to be added into the htaccess file?

gohammers

10:53 am on Jun 22, 2010 (gmt 0)

10+ Year Member



I found out that I had to replace the last line with:

RewriteRule ^/?$ "http://www.site.com/temp/index.html" [R=302,L]

And it is now working fine.