+ Reply to Thread
Results 1 to 2 of 2

Thread: htaccess redirect question

  1. #1
    Join Date
    Mar 2006
    Posts
    462

    Question htaccess redirect question

    I want to completely redirect my site structure and I want to redirect the urls to the homepage until the new page is ready.

    So suppose I have links such as http://www.mysite.com/chat/language=greek+user=new

    http://www.mysite.com/AdvancedGuestB....php?gb_id=724

    So I wanted to try to redirect the respective folder /chat or /AdvancedGuestBook and everything thereafter using regular expressions

    for the first example I tried this:

    RewriteCond %{HTTP_HOST} ^/chat*
    RewriteRule ^(.*)$ http://www.mysite.com$ [R=301,L]

    These are supposed to be permanent redirects.
    Can anybody tell me what the syntax with regex is for redirecting everything after chat or advancedguestbook ?

    Cheers!
    Cheap web hosting review directory listing a
    Hostmonster review and a Bluehost review - CPU, support, plans, speed test, uptime

  2. #2
    Join Date
    Feb 2006
    Location
    Florida, USA
    Posts
    1,349

    Default

    Options +FollowSymlinks
    RewriteEngine on
    rewriterule ^chat(.*) http://yoursite.com/$1 [r=301,nc]

+ Reply to Thread

Posting Permissions

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