how to Redirect using .htacces

They have: 19 posts

Joined: Dec 2011

Hi i know ho to redirect 1 page to another page in your website but i want to Redirect over 90 Pages to new pages . how to do this ? can any one help me here.

Greg K's picture

He has: 2,145 posts

Joined: Nov 2003

Basically you would redirect all non existing pages/directories to a specific script.

That scripts looks up where you were actually trying to go to, and if it finds a redirect, does a header() redirect and exits.

if nothing matches, then treat is as a 404 page (don't forget the header('HTTP/1.0 404 Not Found'); so search engines see it as a 404).

-Greg

They have: 6 posts

Joined: Dec 2012

I think you are really correct.your link is very healpful for us

They have: 3 posts

Joined: May 2015

Thanks Greg Smiling
I have read your replies on other post too, thanks for sharing good knowledge with us.

They have: 31 posts

Joined: Dec 2011

If your website is in Drupal you can download a module which automatically sets the redirect to all your earlier website pages to the new one.This could be done with all the other website which are in CMS.Else if its in plain HTML, you have to do it manually.

They have: 2 posts

Joined: Sep 2012

create a file and name it .htaccess, Once the file is created,
put it at your root directory http://www.yourdomain dot com/.htaccess
Create another file name it maintenance.html
Now you can try to browse your site and it should now redirect you to maintenance.html

Nullified's picture

They have: 12 posts

Joined: Sep 2012

briccio wrote:
create a file and name it .htaccess, Once the file is created,
put it at your root directory http://www.yourdomain dot com/.htaccess
Create another file name it maintenance.html
Now you can try to browse your site and it should now redirect you to maintenance.html

How is it going to redirect to maintenance.html without editing the .htaccess file to tell it to do so?

They have: 2 posts

Joined: Jan 2013

with the help of .htacces file we can solve canonical issue, 301 error, 302 error and 404 error. .htacces file play main important role in web server.

They have: 5 posts

Joined: Aug 2013

Thank you briccio .. .ht file is working fine for me.. i really need that thank you so much

They have: 1 posts

Joined: Dec 2015

If your website is in Drupal you can download a module which automatically sets the redirect to all your earlier website pages to the new one.This could be done with all the other website which are in CMS.Else if its in plain HTML, you have to do it manually.

He has: 2 posts

Joined: Apr 2016

Yes through .htaccess you can load pages in notepad and use redirection techniques.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.