开发者

Apache alias: making shortcuts

开发者 https://www.devze.com 2023-03-08 01:07 出处:网络
I\'m wanting to do something like the following: (in browser address bar, with no forward slashes) fa234

I'm wanting to do something like the following:

(in browser address bar, with no forward slashes)

fa234

And have this point to http://localhost/FA234

In my httpd.conf I used

Redirect permanent /fa234 http://localhost/FA234

but this assumes /fa234 in the address bar is preceded by localhost.

Is 开发者_Go百科there a way to configure httpd.conf so a simple word (without slashes) points to a web address?

Thanks


No because this is not a task for apache. If you enter fa234 your browser tries to look up the ip adress for this hostname. If it is only local and you don't want to use DNS you can modify your hosts file and enter fa234 localhost so that it will be redirected to localhost. But as said above this is not possible by configuring apache

0

精彩评论

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

关注公众号