Page 1 of 1

301 Redirect from old html pages to new php pages

Posted: 2012-10-22 07:56
by karan_sagacious
Hi,
I really need your help regarding an issue I'm facing with .htaccess file.
I've recently moved my website from html to php. Now, I want to redirect few old html pages to new php pages. The problem is that the file names are different.

Example:
How to redirect: http://www.example.com/Patent_Filing_Support.html#
To
http://www.example.com/services_and_pricing.php

Your help is appreciated. Thanks a lot.

Re: 301 Redirect from old html pages to new php pages

Posted: 2013-09-01 15:08
by PieterOliehoek
I would do it quick an dirty:

Code: Select all

<html><body>
<p><a id="rd" href="http://www.example.com/services_and_pricing.php">Click here !!</a>
<script language="javascript" type="text/javascript">
window.location.href = document.getElementById('rd').href;
</script>
</body>
</html>

Re: 301 Redirect from old html pages to new php pages

Posted: 2013-09-01 17:00
by botg
mod_redirect :)

Re: 301 Redirect from old html pages to new php pages

Posted: 2013-12-11 22:40
by halpenny
Put
Redirect /Patent_Filing_Support.html /services_and_pricing.php
into .htaccess

Re: 301 Redirect from old html pages to new php pages

Posted: 2014-01-22 12:57
by Ramesh8248
in .htaccess add this code

Code: Select all

Redirect 301 /htmlpage /Yourphppage
For example
I have to redirect http://www.example.com/mypage.html to http://www.example.com/mypage.php

then, add following code to .htaccess file

Code: Select all

Redirect 301 /mypage.html /mypage.php