.htaccess redirect no working - help please

Discussion in 'Apache' started by SEO-Warrior, Mar 24, 2008.

  1. #1
    Have added the following to .htaccess file in the Devon directory

    Redirect 301 /property/region/Devon/index.php?ss=Devon&tt=England&var1=mls&var=state http://www.domain.co.uk/property/region/Devon/

    Redirect does not work

    Can anyone help please?
     
    SEO-Warrior, Mar 24, 2008 IP
  2. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Hi,

    Try this:
    RewriteEngine on
    RewriteCond %{QUERY_STRING} ^.+$
    RewriteRule ^index\.php$ http://www.domain.co.uk/property/region/Devon/? [L,R=301]
    
    Code (markup):
    Jean-Luc
     
    Jean-Luc, Mar 24, 2008 IP
  3. SEO-Warrior

    SEO-Warrior Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Unfortunately, this solution causes a problem when you click on Next (to get the 2nd/3rd/etc. page of results).

    Index page displays instead of page 2 etc.

    Url of next page is:
    property/region/Devon/index.php?BRSR=10&var=&tt=England&ss=Devon&var1=&code=
     
    SEO-Warrior, Mar 24, 2008 IP
  4. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Two questions: does BRSR identify the page number ? What should be the URL of page 2 ?

    Jean-Luc
     
    Jean-Luc, Mar 24, 2008 IP
  5. SEO-Warrior

    SEO-Warrior Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    BRSR is the number of properties per page
    Good question - what should the url of the second page be? Perhaps
    http://www.domain.co.uk/property/region/Devon/page2

    Sorry for sketchy reply - not sure I am understanding this completely!!
    I assume all Google PR will be re-directed to the newer more user friendly urls?
    Variations of the url above used to produce lists sorted by different parameters - so for code...
    The codes have values of 1 to 6 - these are used for sorts - so 1 might be to sort by region, 2 by number of beds.
     
    SEO-Warrior, Mar 24, 2008 IP
  6. Jean-Luc

    Jean-Luc Peon

    Messages:
    601
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #6
    It is hard to help without exactly knowing how your application uses the rewritten URL's. Creating a good .htaccess file requires to understand this. In some cases, it is even better to manage all this within the php application itself. Again it is hard to comment on this with the kind of information I have.

    Jean-Luc
     
    Jean-Luc, Mar 24, 2008 IP