Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
10-29-2003, 10:05 AM #1
- Join Date
- Jul 2002
- The Netherlands
- Thanked 0 Times in 0 Posts
Apache: redirect if dir doesn't exist
I was wondering if there is a way to achieve the following:
If someone enters the following url: 'www.mydomain.com/test/', while the directory 'test' does not exist, the page page 'redirect.php' should be opened, which in turn should search for the page 'test.php' in the directory 'content'. If that page exists, it should be included in 'redirect.php'. When a directory does exist, this shouldn't happen.
If possible I'd like the url 'www.mydomain.com/test/' to stay visible in the addres-bar. My goal to be able to use 'friendly urls' without having to create different directories for each page.
To achieve this, probably something in .htacces should be altered, but I am a total newbie in this area.
Thanx in advance, Michiel