Jump to content

htaccess hotlink cant access images


vinpkl

Recommended Posts

hi all

i am using this below code in htaccess

RewriteCond %{HTTP_REFERER} !^http://(.+\.)?domain\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|bmp|png|swf)$ /images/nohotlink.gif [L]

 

Also I am using colorbox script to show content in popup.

I have some images in "images" folder inside "colorbox" folder on the root on local server (xampp)

The above code in htaccess file is not showing "images" from this images folder that is inside     colorbox folder on root on local server (xampp)

If i comment those 3 lines in htaccess file then all images are shown fine on local server (xampp).

How can i allow my htaccess file to show these images from inside colorbox folder on local server (xampp)??


Thanks
Vineet

Link to comment
Share on other sites

Well, if i understand you correctly you want to display an image from a "/images" directory if the client's request didn't initiate from a index page on your site. That means it's a normal behaviour if your request did initiate from your site.

For more information - http://httpd.apache.org/docs/2.2/rewrite/access.html

Edited by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.