Go Back   CodingForums.com > :: Client side development > General web building

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-20-2005, 03:46 AM   PM User | #1
quadrant6
Regular Coder

 
quadrant6's Avatar
 
Join Date: Aug 2002
Location: New Zealand
Posts: 150
Thanks: 0
Thanked 0 Times in 0 Posts
quadrant6 is an unknown quantity at this point
Redirecting to the default sub-section (url) using an alias or something like that...

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?
quadrant6 is offline   Reply With Quote
Old 10-20-2005, 10:34 AM   PM User | #2
ronaldb66
Senior Coder

 
Join Date: Jun 2002
Location: The Netherlands, Baarn, Ut.
Posts: 4,253
Thanks: 0
Thanked 0 Times in 0 Posts
ronaldb66 is an unknown quantity at this point
Yes

The answer is "yes", and Ryan Brill described how he did it a while ago in his post 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.
__________________
Regards,
Ronald.
ronaldvanderwijden.com
ronaldb66 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:48 AM.


Advertisement
Log in to turn off these ads.