Are you using Apache as your local server? If so, go to the www directory and create a file like this and save it as index.php:
Now whenever you type http://localhost/ in your browser you will be redirected to http://localhost/yourFolder/.PHP Code:
Hope that helps!
1. SitePoint has an EXCELLENT Apache forum and this post really should have been made there (for correct answers).
2. Have a look at http://datakoncepts.com/seo for a brief summary of setting up Apache's mod_rewrite module and using it to create (and use) "user-friendly" URLs.
can i post this thread there?
or wait for mod to move it there?
apologies once again.....
Originally Posted by gregor002
that is a very nice trick.
but i am pretty sure there are some non-trick.
and nice trick
NO need to apologize (to me or to anyone else)!!! I didn't know that there was an Apache forum until I did a search for SEO (Search Engine Optimization - otherwise known as "user-friendly" URLs) several months ago.
Go ahead and post over there rather than waiting for a moderator to move this (which is not necessary).
BTW, PHP's header(location) "trick" is just the http-equiv=refresh "trick" from basic HTML. What you need is to have Apache do the relocation for you (to the same filename in the subdirectory?).