【发布时间】:2013-01-25 02:01:39
【问题描述】:
我的网站有一个子目录:
http://www.mysite.com/test/
在我的“测试”目录中:
index.php
included-inside-index-file.php
another-included-inside-index-file.php
script.php
现在,我怎样才能用 .htaccess 重写 url,使它像这样工作:
http://www.mysite.com/test --> access index.php
http://www.mysite.com/test/beautiful-url --> access script.php?parameter=beautiful-url
http://www.mysite.com/test/included-inside-index-file.php --> 404 error
http://www.mysite.com/test/another-included-inside-index-file.php --> 404 error
【问题讨论】:
标签: apache .htaccess mod-rewrite url-rewriting