1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

301 Redirect Problem - Programming

Discussion in 'General Programming Chat' started by englandrm, Jul 8, 2011.

Thread Status:
Not open for further replies.
  1. englandrm

    englandrm Senior Member

    Joined:
    Nov 11, 2010
    Messages:
    942
    Likes Received:
    431
    Location:
    Canada
    I'm trying to get my clients' clients to leave reviews on their Google Place Pages and other review sites. Real reviews, from real clients, so I'm assuming a high approval rate (Google won't filter it out).

    What I want to do is make MySite.com/review automatically redirect to the long GooglePlacePage URL.


    I did it in php and html, but both times I ended up with

    MySite.com/review.php
    MySite.com/review.html


    How can I make it just MySite.com/review ?

    Thanks.
     
  2. crashed

    crashed Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 13, 2008
    Messages:
    958
    Likes Received:
    1,198
    Occupation:
    Guru-slayer
    Location:
    Behind the VPN...
    Home Page:
    Easiest way is just to make a new folder called Review.
    Inside that folder add a file called index.php with the following content.

    Code:
    <?
    Header("HTTP/1.1 301 Moved Permanently"); 
    Header("Location: http://www.new-url.com"); 
    ?> 
    
     
    • Thanks Thanks x 1
  3. englandrm

    englandrm Senior Member

    Joined:
    Nov 11, 2010
    Messages:
    942
    Likes Received:
    431
    Location:
    Canada
    Wow, you are a genius. Thank you so much.
     
Thread Status:
Not open for further replies.