I really need to redirect www.domain.com:81/site/
to www.domain.com
. Previously I have used mod_rewrite, is it possible to solve this in a similar way?
You have multiple choices:
Using a htaccess file:
RewriteRule (.*) http://www.domain.com/$1 [R=permanent,L]
Redirect 301 / http://www.domain.com/
Where 301 is permanent (302 temporarly) Using php:
<?php header('Location: www.domain.com');
Using html:
<meta http-equiv="refresh" content="0; url=http://www.domain.com/">
Using javascript:
document.location = "http://www.domain.com";
pick one!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.