开发者

Windows host file or similar force IE servername to full domain

开发者 https://www.devze.com 2023-03-17 04:22 出处:网络
Have a server on our network that r开发者_StackOverflow社区uns a webservice so when you go to URL it shows as http:\\myserver

Have a server on our network that r开发者_StackOverflow社区uns a webservice so when you go to URL it shows as http:\myserver

Can I use the hostfile of something similar to force the URL to display as http:\myserver.domain.com

??? Please help.


Create a DNS record that points the server's IP address to the name you want to use in the URL.


I think the following in your .htaccess should do the trick without creating a redirect loop:

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{HTTP_HOST} ^SERVER$ [NC]
RewriteRule .* http://SERVER.domain%{REQUEST_URI} [R=301,L]

It may need a bit if tweeking, but it's how I would do it.

0

精彩评论

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