1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

can't 301 redirect "extensionless" URLs...

Discussion in 'Site & Server Administration' started by Pixelrage, Nov 10, 2008.

  1. #1
    Yesterday, I tried to 301 redirect a bunch of URLs that had no extensions, (such as http://www.mysite.com/colors/blue) to a new location on a new domain. They all wound up returning 500 errors.

    This is an example of how I tried the 301. I can't imagine why this doesn't work for URLS without a trailing ".php" or ".html":

    RewriteEngine ON
    Redirect 301 /colors/blue http://www.mynewsite.com/blue
    Code (markup):
    any ideas?
    SEMrush
     
    Pixelrage, Nov 10, 2008 IP
    SEMrush
  2. happpy

    happpy Well-Known Member

    Messages:
    926
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    120
    #2
    i tend to not use the rewrite engine. i prefer using php in combination with a

    ErrorDocument 404 /404.php in .htaccess

    then the 404.php send a "200 ok" status and has some logics what to do with which urls... work fine and saves me the hassle with nonworking rewrite rules.

    if you need such thing set up, PM me.
     
    happpy, Nov 10, 2008 IP
    Pixelrage likes this.