.htaccess和phpconfiguration
我有一些麻烦,以获得.htaccess文件的正确configuration。 我使用mvc模式制作了一个小站点,所有的url都像site.com/appname/public/index.php?param=page。 我试图让所有url写为site.com/page。 我search了Apache文档,但我仍然困惑… 这是我现在在/ public目录中的: Options -MultiViews RewriteEngine on RewriteBase /appname/public/ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.+)$ index.php?url=$1 [QSA,L] 这是我在根目录中的: RewriteEngine On RewriteRule ^(.*)$ appname/public [R=301,L] 这工作正常,它redirect到index.php(在/公共目录),并重写所有url到site.com/appname/public/page。 现在我triyng得到更多,我也会隐藏/ appname /公共,但我不能undestand如何。 我应该结合更多的RewriteRule来匹配“/ appname / public”吗? 有什么build议么? 非常感谢! 编辑:关于我想要实现的更多信息。 我有一个目录树,如: htdocs |—appname | |—app | |—other_dirs | |—other_files | |—public |—some_dirs/file |— index.php 为了访问我的网页,我需要指向浏览器index.php并传递一些GET值。 […]