vinpkl Posted May 23, 2014 Share Posted May 23, 2014 hi alli 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)??ThanksVineet Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/ Share on other sites More sharing options...
jazzman1 Posted May 23, 2014 Share Posted May 23, 2014 I have some images in "images" folder inside "colorbox" folder on the root on local server (xampp) Then the following path is wrong -> /images/nohotlink.gif Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/#findComment-1480574 Share on other sites More sharing options...
vinpkl Posted May 23, 2014 Author Share Posted May 23, 2014 Hi Jazz there are 2 separate images folder on my server http://domain.com/images http://domain.com/colorbox/images thanks vineet Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/#findComment-1480581 Share on other sites More sharing options...
jazzman1 Posted May 23, 2014 Share Posted May 23, 2014 (edited) 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 May 23, 2014 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/#findComment-1480597 Share on other sites More sharing options...
vinpkl Posted May 23, 2014 Author Share Posted May 23, 2014 Hi jazz Images are already displaying fine from "/images" folder on the root. I want to access and display images from "/colorbox/images/" folder thanks vineet Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/#findComment-1480603 Share on other sites More sharing options...
jazzman1 Posted May 23, 2014 Share Posted May 23, 2014 Do you understand the different b/w requesting directories/files from outside and inside to your domain? Quote Link to comment https://forums.phpfreaks.com/topic/288703-htaccess-hotlink-cant-access-images/#findComment-1480606 Share on other sites More sharing options...
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.