how to 301 redirect a php based joomla website to html website

1 replies
  • SEO
  • |
How to 301 redirect entire website having different url extensions?

#Please don't answer without reading the entire post#

For example, I have a Joomla website with below links:

http://mywebsite.com

http://mywebsite.com/about-us.php

http://mywebsite.com/contact-us.php

I want 301 redirect above website to new domain with below links.

http://newsite.com

http://newsite.com/about.html

http://newsite.com/contact.html

I want to know, it would be enough to implement 301 code given below in htaccess file.

Redirect 301 / http://newsite.com

OR i will have to write code for every page, since url names and extensions are changed.

Should url names and url extensions be the same in new website as it is there in old website while implementing 301 redirect.

I mean http://mywebsite.com/about-us.php will be successfully redirected to http://newsite.com/about.html. with just this code Redirect 301 / http://newsite.com

Thanks for answering.
#301 #based #html #joomla #php #redirect #seo #website
  • Profile picture of the author paulgl
    php puts out html....

    Anyway, it's very simple.

    Putting the .php only tells the browser that it might include
    some php code. Here's the kicker: It does not need to have
    any php code.

    So the easiest way is to just save your html pages as .php
    with the very same file names. Easy.

    Of course I am assuming your server is setup for php and you
    are not moving to a server that does not have it. Not having
    php ability would be very rare in 2014. Even though the
    pages will not use php, the server may gag on any file
    with a .php extension if not enabled.

    php makes doing html pages very, very easy. Leaving the pages
    with the php extensions gives you the future possibility of
    using php on them.

    No 301 redirecting is needed.

    Paul
    Signature

    If you were disappointed in your results today, lower your standards tomorrow.

    {{ DiscussionBoard.errors[9719426].message }}

Trending Topics