Reply to Re: page redirects on dynamically created folders

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация