Posted by Janwillem Borleffs on 05/09/05 23:56
Deano wrote:
> <?
> header("location: http://www.mysite.com/index.php");
>>
>
>
> This forces an immediate redirect to the homepage and works as I want
> it to work.
>
A simple modification of the httpd.conf file prevent directory viewing:
Options -Indexes
You could even use an ErrorDocument directive in the same file to redirect
these requests to the site's homepage:
ErrorDocument 403 http://yoursite/
See: http://httpd.apache.org/docs/mod/core.html for more info.
BTW, moving a copy of index.php each time a folder is created is an easy
task with the copy() function (see: http://www.php.net/copy).
However, you are bound to experience some trouble because of restrictive
permissions; the best way therefore is to perform the copy as a super user.
Otherwise, the permissions should be (temporary) modified to perform the
copy operation.
JW
Navigation:
[Reply to this message]
|