Hi Hope someone can offer advice on this? I want to redirect oldpage.htm to newpage.htm using a 301 redirect (oldpage.htm has a PR and I dont want to lose it). Hosted server is windows based, I dont have .htaccess file capability, php and asp ARE available. I've found a php script for redirecting oldpage.php to newpage.html, and a test confirms it works on my host - but my existing pages are .htm ... Can anyone offer a suggestion please? Thanks in advance!
put between the <head> tags of your HTML document: <meta http-equiv="refresh" content="2;url=http://www.your-site.com/newpage.htm"> Code (markup): The '2' makes that the site refreshes almost instantly. Change the url to the full 301 url.
Hi and thanks for the suggestion. Is this whats called a "meta-refresh"? If so, I was under the impression thats its considered a bit "spammy". Also, would this in time ensure that the old pages PR is eventually passed onto the new page? It turns out that my web hosting service can change my account from a windows one to a linux one, and that under linux I can use the htaccess method to create a 301 redirect. Not sure this is the right forum for the next question but are there any implications in changing from windows to linux?
this also works: <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.blahblahblah.com/" ); ?>
Thanks for the suggestion KMan. I tried a test using this but unfortunately it doesnt work. If you add in php after the first ? in your suggested code AND the page this code is in is a .php page then the page WILL redirect to a new.htm page. ie, Content of old.php ------------------ <?php Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: http://www.mysite.com/newpage.htm" ); ?> But I need to redirect from old.htm to new.htm Anyone else got any ideas? Or should I just move to a linux based server so I can use .htaccess functionality? Anyone got any views about windows server vs linux server? How might this affect me?
lots of info here http://www.webconfs.com/how-to-redirect-a-webpage.php <%@ Language=VBScript %> <% Response.Status="301 Moved Permanently"; Response.AddHeader("Location","http://www.new-url.com/"); %>
Use .htaccess! Redirect 301 /page1.html /page2.html Code (markup): If you want to run PHP in .htm and/or .html files, try this: AddType application/x-httpd-php .php .htm .html Code (markup): Regards
Thanks for the link Carolyheath, but I've already been there in my search for THE ANSWER I'll have a look at the suggestion but at first glance it seems to be for .asp pages. Will report back when I have tried it. Currently also exploring perl scripts via another thread and will report back for the sake of completeness ... but any other suggestions more than welcome in the meantime!
For the sake of completeness thought I'd report back on my final solution - have joined the ranks of Linux users. htaccess has done the job for me. Thanks to all who have helped out.
I hope this is relevant. I was trying to point mckeonengineering.com to www . mckeonengineering.com (sorry for breaking it up, but I don't have enough posts to put in a live link just yet. I used the following in a .htaccess file and it didn't work: RewriteEngine On rewritecond %{http_host} ^mckeonengineering.com rewriteRule ^(.*) http: // www . mckeonengineering.com/$1 [R=301,L] Please ignore the spaces in the link since that is only necessary so I can post it here since I don't have enough posts to have live links. Would like any help. Thanks. Jesus Lives!