如何写404重定向的.htaccess code?重定向、如何写、code、htaccess

由网友(路途遥远、勿忘初心)分享简介:我提出我的网站从ASP到PHP。我想重定向我的老ULR这是I Have moved my site from asp to php.I want to redirect my Old ULR which ishttp://www.mysite.com/ABC/Home.aspx新网址http://www.my...

我提出我的网站从ASP到PHP。 我想重定向我的老ULR这是

I Have moved my site from asp to php. I want to redirect my Old ULR which is

http://www.mysite.com/ABC/Home.aspx

新网址

http://www.mysite.com

如何做到这一点?我才知道我们可以做到这一点.htaccess文件。但我不知道它的编程。可一些身体与我分享一个code?并在将这一code?在主.htaccess文件或者在我的ABC文件夹中创建一个.htaccess文件??

How to do that?? I came to know we can do this .htaccess file. but i don't know about its programing. can some body share a code with me? and where to place this code?? in Main .htaccess file or create a .htaccess file in my ABC folder??

推荐答案

我用下面的code。在.htaccess文件

I Used following code in .htaccess file

Redirect 301 /ABC/Home.aspx http://www.addictiveblogs.com/
Redirect 301 /ABC http://www.addictiveblogs.com/

和把这个.htaccess文件在我的ABC文件夹中。它为我工作正常。现在,重定向我所有的交通 http://www.addictiveblogs.com/ABC/Home.aspx和 http://www.addictiveblogs.com/ABC/ 我的首页。

and put this .htaccess file in my ABC folder. It works fine for me. Now Redirecting my All traffic http://www.addictiveblogs.com/ABC/Home.aspx and http://www.addictiveblogs.com/ABC/ to my Home Page.

来源: HTTP://www.addictiveblogs .COM / 301-404-重定向到新的页面,通htaccess的/

阅读全文

相关推荐

最新文章