我有一个子文件夹域,如:
/domain.com
L service
L application
L ...
L library
L public
L index.php
L .htaccess
和我的.htaccess
:
RewriteEngine On
RewriteBase /service
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
当我运行domain
http://domain.com/service它自动重定向到
http://domain.com/service/public。
但是我不希望它使用/public
文件夹。如何修复
publicL index . phpL . htaccess
将两个文件放在公用文件夹外,并删除公用文件夹。之后打开index.php文件,替换路径
|| define('APPLICATION_PATH', realpath(dirname(FILE)。"/. ./应用程序"));
|| define('APPLICATION_PATH', realpath(dirname(FILE)。/应用程序));
给出应用程序文件夹的路径