Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

301 redirects for windows to linux

  • 13-07-2010 8:48am
    #1
    Registered Users, Registered Users 2 Posts: 597 ✭✭✭


    Hello,

    I have a website thats been changed from .net to php and Im going to create 301 redirects for the old pages to the new ones. For example, I want to redirect mysite.com/thispage.aspx to mysite.com/thatpage.php. Both have the same content.

    I'm trying to figure out how to do the redirects properly. My new server is a linux server and will not run .net(.aspx) pages so I guess I have to create the redirects in php. Bu tI am unsure if that would work becouase of the extension name change.

    Using the example above, Should I create a php page called thispage.php and use something like the script below to redirect to thatpage.php?

    <?
    Header( "HTTP/1.1 301 Moved Permanently" );
    Header( "Location: http://www.nmysite.com/thatpage.php&quot; );
    ?>

    I don't have access to the php.ini or .htaccess files on the new server. Apologies if this is not clear.

    Thank you


Comments

  • Registered Users, Registered Users 2 Posts: 7,740 ✭✭✭mneylon


    Use Apache's mod_rewrite via a .htaccess

    That's what it's there for :)


  • Registered Users, Registered Users 2 Posts: 597 ✭✭✭yeraulone


    Thank you - works fine


Advertisement