www.webdeveloper.com
Results 1 to 2 of 2

Thread: Help with 301 redirects - please!

  1. #1
    Join Date
    Nov 2009
    Posts
    20

    Help with 301 redirects - please!

    I'm a rather new website builder/administrator, and have a slightly tricky (for me) problem that I'd like a little help with.

    One page of my website is:

    http://www.trainingreality.co.uk/blog.php

    I've created a 301 redirect to send people from ../blog.html to ../blog.php in case they type that instead (and because the page used to be a html page). This is working fine.

    However, I've noticed that if some people type in:

    http://www.trainingreality.co.uk/blog

    they actually get

    http://www.trainingreality.co.uk/blog/

    which leads to an error (I've set up "branded" error pages). I'd like this one (as it's a common error) to go to the .php blog page, but I can't get 301 redirects to work. The reason is there are lots of sub-pages to the blog folder, and if I do the following redirect:

    Redirect 301 /blog/ http://www.trainingreality.co.uk/blog.php

    it works fine for the specific instance, but causes problems for all the individual blog pages i.e. what should be

    http://www.trainingreality.co.uk/blo...-is-golden.php

    comes out as

    http://www.trainingreality.co.uk/blo...-is-golden.php

    Anyone got any ideas - that they can explain to a simple soul like me?

    Thanks, Simon.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Try this
    Code:
    <FilesMatch .*>
       Options +MultiViews
    </FilesMatch>
    It doesn't matter to the server if the file extension is given or not.
    It can give problems if there are files and directories with the same name.
    Last edited by Fang; 11-21-2009 at 05:05 AM.
    At least 98% of internet users' DNA is identical to that of chimpanzees

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles