SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Feb 2010
    Location
    Anglesey, Wales, UK
    Posts
    66
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    htaccess 301 redirects not working

    Hi, i've just redesigned my site and want to use some 301 redirects to catch the old google results.

    For example, this page:http://www.trjones.co.uk/index.php/l...&id=4&Itemid=5

    needs to point here: http://www.trjones.co.uk/index.php/lubricants

    myhtaccess file looks like this:

    Code:
    RewriteOptions inherit
    
    RewriteEngine on
    
    RewriteCond %{HTTP_HOST} ^trjones\.biz$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.trjones\.biz$
    RewriteRule ^/?$ "http\:\/\/www\.trjones\.co\.uk\/" [R=301,L]
    
    
    Redirect 301 /index.php/lubricants?option=com_content&view=article&id=4&Itemid=5 http://www.trjones.co.uk/index.php/lubricants
    the .biz redirect works, but the page redirect doesn't.

    Any ideas?

    Thanks

  2. #2
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    156,

    Just WHY are you quoting and escaping your RewriteRule's redirection?

    Redirect cannot access the query string.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •