我有localhost上以下的目录结构:的.htaccess公用文件夹
目录结构测试的内部存在如下:
/testing/public
/testing/public/index.php
/testing/public/img
/testing/public/css
..etc for the js and swf directories
.htaccess文件是里面的测试文件夹和内容如下:
Options +FollowSymLinks
RewriteEngine on
RewriteBase /testing/
RewriteRule ^public$ public/ [R,QSA]
RewriteRule ^public/$ public/index.php?state=public [L,QSA]
RewriteRule ^stackoverflow$ stackoverflow/ [R,QSA]
RewriteRule ^stackoverflow/$ public/index.php?state=stackoverflow[L,QSA]
我使用PHP和/testing/public/index.php文件,我想测试$ _GET ['state']确实正在保存变量。
当我试图测试一下:
http://localhost/testing/public
$ _GET [ '状态']是不是在所有但
http://localhost/testing/stackoverflow
确实呼应的是,$发现_GET ['state']等于'stackoverflow'。
我在这里丢失什么?为什么我在第一个链接中无法获得state = public?谢谢您的帮助!
你说得对,你确实优先!最后,我可以用一个理智的头脑睡觉......哈哈。谢谢Nathan。我将目录的名称完全更改为'public_content'以完全避免它。再次谢谢你! – ninu 2010-06-03 04:15:44