Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Posts
    151
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,253
    Thanks
    0
    Thanked 0 Times in 0 Posts

    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •