Does anybody know how to forbid accessing domain/images folder?
Try this store:
http://www.homedecorr.com/images/
All images are accessible
But in this store:
http://www.ponyvillages.com/images/
showed: Forbidden
You don't have permission to access /images/ on this server.
------------------------------------------------------------
Apache/2.0.52 (CentOS) Server at www.ponyvillages.com Port 80
I tried to change the file permissions to 766 or 744 in cpanel, it did not work, it made all images invisible in the main page.
Page 1 of 1
Forbid to access domain/images folder?
#2
Posted 04 November 2009 - 02:52 AM
snowrabbit, on 03 November 2009 - 09:46 PM, said:
Does anybody know how to forbid accessing domain/images folder?
Try this store:
http://www.homedecorr.com/images/
All images are accessible
But in this store:
http://www.ponyvillages.com/images/
showed: Forbidden
You don't have permission to access /images/ on this server.
------------------------------------------------------------
Apache/2.0.52 (CentOS) Server at www.ponyvillages.com Port 80
I tried to change the file permissions to 766 or 744 in cpanel, it did not work, it made all images invisible in the main page.
Try this store:
http://www.homedecorr.com/images/
All images are accessible
But in this store:
http://www.ponyvillages.com/images/
showed: Forbidden
You don't have permission to access /images/ on this server.
------------------------------------------------------------
Apache/2.0.52 (CentOS) Server at www.ponyvillages.com Port 80
I tried to change the file permissions to 766 or 744 in cpanel, it did not work, it made all images invisible in the main page.
You can "forbid" it with a .htaccess command (I think).
I prefer redirection.
In the /images folder make an index.php file and put this content in it:
<?php
header ("Location: http://www.YOURDOMAIN.com/index.php");
?>Just change the redirect location to suit your needs.
If I suggest that you edit any file(s) make a backup first - I'm not perfect and neither are you.
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
#4
Posted 04 November 2009 - 03:31 AM
snowrabbit, on 03 November 2009 - 10:29 PM, said:
Really appreciate!
I don't know much about php, could you please input a little detail? what is redirection?
I don't know much about php, could you please input a little detail? what is redirection?
Making the viewers browser go to a different page.
If I suggest that you edit any file(s) make a backup first - I'm not perfect and neither are you.
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
#6
Posted 04 November 2009 - 03:40 AM
snowrabbit, on 03 November 2009 - 10:37 PM, said:
Thank you!
what i got after adding a index.php was:
Fatal error: Call to undefined function phpheader() in.............on line 1
How can I get the wording above like:
Forbidden
You don't have permission to access /images/ on this server.
what i got after adding a index.php was:
Fatal error: Call to undefined function phpheader() in.............on line 1
How can I get the wording above like:
Forbidden
You don't have permission to access /images/ on this server.
Make sure the code appears just as I posted it.
Three lines of code.
If you copy/paste from the forum it may have "run together" on one line.
If I suggest that you edit any file(s) make a backup first - I'm not perfect and neither are you.
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
I only post what the voices in my head tell me to.
$sample_it = ( ($this->has_Flavor() ) ? $mmm->mmm('good') : $want->do_Not() );
#7
Posted 04 November 2009 - 03:56 AM
I understand what the php means now, it will go to my main page when browsing domain/images. isn't?
I found a lots of stores come up with the wording "Forbidden.........." don't know how.
Anyway, your way also make my images folder un-accessible. That is great!
Thank you so much!
I found a lots of stores come up with the wording "Forbidden.........." don't know how.
Anyway, your way also make my images folder un-accessible. That is great!
Thank you so much!
Page 1 of 1

Sign In
Register
Help



MultiQuote