Domain Manage

htaccess redirect question...

Discussion in 'Website Design' started by mat, Jun 30, 2010.

Thread Status:
Not open for further replies.
  1. mat United Kingdom

    mat Well-Known Member

    Joined:
    Apr 2007
    Posts:
    3,782
    Likes Received:
    73
    Have worked it out now..... Thank you all for your help!
     
    Last edited: Jul 1, 2010
  2. Domain Forum

    Acorn Domains Elite Member

    Joined:
    1999
    Messages:
    Many
    Likes Received:
    Lots
     
  3. illtemper

    illtemper Active Member

    Joined:
    Oct 2007
    Posts:
    65
    Likes Received:
    2
    You need something like:

    Options +FollowSymlinks
    RewriteEngine On
    RewriteRule ^whiteproduct/([^/.]+)/?$ /search.php?q=$1 [R,L]

    I'll have another look tomorrow if that doesn't work
     
    • Like Like x 1
    Last edited: Jun 30, 2010
  4. mat United Kingdom

    mat Well-Known Member

    Joined:
    Apr 2007
    Posts:
    3,782
    Likes Received:
    73
    Thanks, thats the sort of thing I have been trying...

    Just tried exactly what you put, but didnt work. :confused:
     
  5. mat United Kingdom

    mat Well-Known Member

    Joined:
    Apr 2007
    Posts:
    3,782
    Likes Received:
    73
    Its something to do with the question mark which is stopping it from working so I see from a quick search in Google!
     
  6. mat United Kingdom

    mat Well-Known Member

    Joined:
    Apr 2007
    Posts:
    3,782
    Likes Received:
    73
    I worked out this in the end...

    RewriteCond %{QUERY_STRING} ^q=(.*)$
    RewriteRule ^(.*)/$ http://www.sitename.co.uk? [L,R=301]
     
    • Like Like x 1
  7. illtemper

    illtemper Active Member

    Joined:
    Oct 2007
    Posts:
    65
    Likes Received:
    2
    Glad you got it sorted, mod_rewrite can be a PITA lol and I had just looked at too much code yday to figure it out :p
     
Thread Status:
Not open for further replies.

Share This Page