How to Customize a WordPress Theme


Results 1 to 4 of 4

Thread: WP HTACCESS 301 redirect not working on safari

  1. #1
    Join Date
    Sep 2012
    Location
    Ilkeston, Derbyshire, England
    Posts
    1,869

    Default WP HTACCESS 301 redirect not working on safari

    Just been testing a 301 redirect on my iPad, and since Safari is the native browser to this tablet I know a lot of people will be viewing my site using this browser...

    Here's my issue:

    When I type www.mysite.com/video

    I want it to redirect to

    Www.mysite.com/category/video

    Which works on all browsers except Safari.

    With Safari you HAVE to type the trailing slash after the custom URL otherwise it returns a 404 not found page.

    So I have to type www.mysite.com/video/ in order to execute the redirect.

    How can I correctly write the the redirect without the trailing slash?

    Knowing my audience I can honestly say most of them will NOT type the trailing slash.

    Been Googling this but it is very confusing.

    Anybody got any thoughts/ideas on this?

    Thanks!


    Edit: I think I have solved the issue...

    I realised my redirect was actually using the trailing slash in HTACCESS, which Safari could not understand.

    I changed /video/ to /video in HTACCESS and it now works on the iPad and Safari.

    This has created a potential duplicate content situation.

    I now have canonical URLS. If I begin posting both these links around the web Google will crawl these and see a duplicate content situation.

    The answer is to ensure any URLs without the trailing slash are redirected to a version of the URL with the trailing slash.

    This tells Google to only really look at one URL instead of seeing two. Domain authority is split between the two. Like they say, if you chase two rabbits, both will escape

    I have found the following article useful and I am attempting to implement their advice:

    http://www.mydigitallife.info/add-tr...rewrite-rules/
    Last edited by Darren; 04-11-2014 at 06:19 AM. Reason: Additional info

  2. #2
    Join Date
    Apr 2007
    Posts
    15,297

    Default

    wow, glad you got it resolved 'cause I wasn't sure what to tell ya on this one! Good tips though for anyone who may go thru this. Thanks!

  3. #3
    Join Date
    Sep 2012
    Location
    Ilkeston, Derbyshire, England
    Posts
    1,869

    Default

    I still haven't actually resolved it... I'm looking for advice on how to redirect the none trailing slash URL to a URL with a trailing slash.

    The real solution is to not let Google crawl the shorter URL (the 301 redirect) but I cannot rely on that since other people might link to me voluntarily from their website and then that means there are two URLs pointing at duplicate content...

    Still looking for advice (and I need to experiment with .HTACCESS)

  4. #4
    Join Date
    Sep 2012
    Location
    Ilkeston, Derbyshire, England
    Posts
    1,869

    Default

    Here is some info about duplicate content issues and multiple URLs for the same page

    http://googlewebmastercentral.blogsp...-to-slash.html

    Edit - okay, I've decided to use rel=canonical in my Http header of the site!

    Info here: https://support.google.com/webmaster...139066?hl=en#5
    Last edited by Darren; 04-12-2014 at 06:13 AM.

Posting Permissions

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