SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot forum11's Avatar
    Join Date
    Feb 2006
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Redirect from example.com/sub to sub.example.com by htaccess

    Can anyone tell me how to redirect from example.com/sub to sub.example.com by .htaccess by remaining query string as it is.

    e.g: redirect
    example.com/sub/details.php?id=01
    to
    sub.example.com/details.php?id=01

    Thanks
    Do Good Have Good!

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    ^(.*?)/(.*?)/(.*?)$ $2.$1/$3


Bookmarks

Posting Permissions

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