1
4

2 回答 2

0

I recommend you read THIS which explains how to redirect a site using htaccess.

Also, it might be simpler using PHP:

<?
Header( "HTTP/1.1 301 Moved Permanently" ); 
Header( "Location: http://www.new-url.com" ); 
?> 

in htaaccess it is:

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]

Please REPLACE www.newdomain.com in the above code with your actual domain name.

于 2013-10-01T04:55:58.563 回答
0

Using mod_alias:

RedirectMatch 301 ^/page-([0-9]+)\.html$ /$1.html 

or using mod_rewrite:

RewriteEngine On
RewriteRule ^page-([0-9]+)\.html$ /$1.html [L,R=301]
于 2013-10-01T05:19:31.767 回答