开发者

How to do an Apache2 rewrite for ip based address

开发者 https://www.devze.com 2023-01-25 08:46 出处:网络
I have a development server that has Ubuntu server 10开发者_如何学编程.10 with an ip of 192.168.0.175.

I have a development server that has Ubuntu server 10开发者_如何学编程.10 with an ip of 192.168.0.175. When I enable the rewrite mod for apache2 and change the site config to allow rewrite then things get all messed up.

With rewrite turned off and allow rewrites to None then I type in 192.168.0.175/test and the site loads, but with it all turned on it changes the address to www.192.168.0.175/test and the site does not load.

Why is this happening?


www.192.168.0.175 is wrong. If you type www the browser assumes that is a domain name.

The Ip's should be prefixed with www

0

精彩评论

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