boxturt Posted July 6, 2006 Posted July 6, 2006 I have the following (excerpt) in my htaccess file to allow access to certain sites to view graphics files else land at the index page: >RewriteEngine on RewriteCond %{HTTP_REFERER} !^http://allowed-site1.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://allowed-site1.com$ [NC] RewriteCond %{HTTP_REFERER} !^http://allowed-site2.com/.*$ [NC] RewriteCond %{HTTP_REFERER} !^http://allowed-site2.com$ [NC] RewriteRule .*\.(jpg|jpeg|gif|png|bmp)$ /index.html [R,NC] This works fine but is there a way that I can "approve" my own self by allowing my IP? Sometimes I need to view things outside the page environment. No biggie but it would make life a little easier. As always, I appreciate your time and input, Quote
TCH-Andy Posted July 6, 2006 Posted July 6, 2006 Try adding the following line into your list of conditions; >RewriteCond %{REMOTE_ADDR} !^192\.192\.192\.192$ and replace the 192.192.192.192 with your IP address Quote
boxturt Posted July 6, 2006 Author Posted July 6, 2006 Outstanding! Works perfectly. Thanks Andy Quote
TCH-Andy Posted July 6, 2006 Posted July 6, 2006 You're welcome I'm glad it's all working nicely Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.