我正在尝试在我的本地机器(wamp)中清理URL,然后在我的在线网站中使用该(.htaccess)脚本。这是我的本地主机地址在本地主机中清理URL
http://localhost/index.php
http://localhost/people.php
http://localhost/current.php
我想分别清理这个网址到
http://localhost/home/
http://localhost/People/
http://localhost/Current/
。但开始(也容易)我只想改变index.php文件到首页。我发现这个脚本的时候,搜索网页
RewriteEngine on
RewriteRule ^home/?$ index.php [NC,L]
,但是当我在我的本地机器没有尝试过这个剧本的工作,还是我的网址显示这样
http://localhost/index.php
我不知道我哪里错了,可以任何一个可以帮助我..
您是否在浏览器窗口中键入'localhost/home /'?您知道原始文件名仍然保存。 –
不,我没有试过.. – Eka
看到我的答案比。 –