...

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



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

example:
www/about/
www/about/general/
www/about/contact/
www/about/policy/


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?

ronaldb66
10-20-2005, 10: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum