开发者

Redirect php page with htaccess

开发者 https://www.devze.com 2023-02-05 04:49 出处:网络
My old domain address is http://www.example.com/viewtopic.php?t=123456 and then I want to redirect all these type of addresses to http://www.newdomain.com/viewtopic.php?t=123456

My old domain address is http://www.example.com/viewtopic.php?t=123456

and then I want to redirect all these type of addresses to http://www.newdomain.com/viewtopic.php?t=123456

RewriteEngine on
RewriteBase /
RewriteRule开发者_如何学Python viewtopic\.php?t=([^/]+)$ http://freeware2010.com/viewtopic.php?t=$1 

The code does not appear to work.


You want a permanent (301) redirect. Here are a couple of tutorials on how to do it (the first being very verbose and slow-paced, so good for a beginner).

http://www.gnc-web-creations.com/301-redirect.htm

http://www.askapache.com/htaccess/301-redirect-with-mod_rewrite-or-redirectmatch.html

0

精彩评论

暂无评论...
验证码 换一张
取 消