View Full Version : Redirecting to the default sub-section (url) using an alias or something like that...

10-20-2005, 04:46 AM
For my website, I have a 2 level navigation (sections/subsections within the selected section) and use the following direcctory structure


What I want to happen is for the browser to go into the default subsection (that I define i.e. /general) when they click on the about link.

There are 2 very simple and obvious ways of doing this:

1) Make the main 'about' link go to 'about/general'

2) Create a PHP redirect at /about/index.php

I think it would be nicer to somehow setup a alias (not sure exactly if alias is the right term) so that about/ = about/general

Any suggestions? is there a way to do this using htaccess?

10-20-2005, 11:34 AM
The answer is "yes", and Ryan Brill described how he did it a while ago in his post Cruft-free URLs (http://www.ryanbrill.com/archives/cruft-free-urls/).
If you use that as a search term, I'm sure Google will find a whole bunch more, but Ryan covered the basics pretty well, I reckon.