1
這是我的應用程序框架:403錯誤時,在子文件夾(笨)訪問控制器
application
controllers
backend
[backend_controllers_here]
[frontend_controllers_here]
models
[shared_models_for_both_backend_and_frontend]
views
backend
[backend_views_here]
[frontend_views_here]
...
system
index.php
.htaccess
這是我的.htaccess文件的內容:
Options -Indexes
Options +FollowSymLinks
# Set the default file for indexes
# DirectoryIndex index.php
<IfModule mod_rewrite.c>
# activate URL rewriting
RewriteEngine on
# do not rewrite links to the documentation, assets and public files
RewriteCond $1 !^(images|assets|uploads|captcha)
# do not rewrite for php files in the document root, robots.txt or the maintenance page
RewriteCond $1 !^([^\..]+\.php|robots\.txt)
# but rewrite everything else
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 index.php
</IfModule>
沒什麼錯了,當我在地址線輸入酒吧像這些(爲前端):
- mysite.local
- mysite.local/index.php文件
- mysite.local/index.php文件/ frontend_controller
- mysite.local/frontend_controller
但對於後端我有一個403錯誤時嘗試訪問:
- mysite.local /後端
- mysite.local /後端/ some_backend_controller
但是,在URL中的index.php一切都很好。
- mysite.local/index.php文件/後端
- mysite.local/index.php文件/後端/ some_backend_controller
我失去了一些東西在這裏?
謝謝你的時間!
這顯然不是問題,因爲它適用於index.php。這可能是一個URL重寫規則的問題,不希望這個用例。 –
@ Vlad:我的應用程序文件夾已經有777個權限。 –