![]() |
|
|||||||
| 服务器环境搭建 Windows,Linux,IIS,Apache等服务器配置、安全维护以及PHP和MYSQL运行环境讨论。 |
|
|
Thread Tools | Display Modes |
|
#2
IP: 117.95.53.152
|
|||
|
|||
|
If you want a Domain Alias to redirect and put the correct hostname in
the URL bar of the browser, you can use mod_rewrite. If you are hosting original.com and have a domain alias of alias.com and you want all requests for alias.com urls to be redirected back to original.com urls, then you would put this in an .htaccess file in any directory where you want this redirection to happen: Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} alias.com$ [NC]
RewriteRule ^(.*)$ http://www.original.com/$1 [R]
.htaccess file. So a request for http://www.alias.com/docs/services.html will be redirected to http://www.original.com/docs/services.html as well. |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|