[英]How to send base path in Zend 2 framework?
我是zend 2的新手。我已經運行過此應用程序,它可以正常工作,但訪問其他頁面或控制器時可能會出現404錯誤。...
http://localhost/Gojavas/public/
點擊登錄按鈕
自動刪除url中的主文件夾.....並顯示404頁面錯誤...請幫助我....謝謝
Htaccess文件
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
RewriteBase /Gojavas/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]
<ifmodule !mod_rewrite.c>
ErrorDocument 404 /index.php
</ifmodule>
請嘗試一下
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
...表示如果瀏覽器中具有指定名稱的文件不存在,或者瀏覽器中的目錄不存在,則繼續執行以下重寫規則
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ %{ENV:BASE}index.php?/$1 [QSA,L]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.