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
    Dec 2006
    Posts
    417
    Thanks
    168
    Thanked 1 Time in 1 Post

    mod rewrite question using subdomains - help please

    Hi, I have created a subdomain:

    http://community.foo.com which points to http://www.foo.com/groups/view/index.php

    through my hosting service's control panel

    now I want to write a script that takes people to their group page.

    so if the group name is "TVLand"

    I would like to know how to make this URL:

    http://community.foo.com/TVLand

    point to this script:

    http://www.foo.com/groups/view/index...me='TVLand'

    thanks for all you help!

  • #2
    Senior Coder shyam's Avatar
    Join Date
    Jul 2005
    Posts
    1,563
    Thanks
    2
    Thanked 163 Times in 160 Posts
    Code:
    RewriteCond %{HTTP_HOST} ^community\.foo\.com$ [NC]
    RewriteRule ^(.*)$ http://www.foo.com/groups/view/index.php?groupName=$1 [R=301,L]
    You never have to change anything you got up in the middle of the night to write. -- Saul Bellow


  •  

    Posting Permissions

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