0
我的Web服務器上有zf2,我無法更改Apache中的啓動位置。我將.htaccess複製到public_html上,在/public/index.php上更改了路徑,但是我遇到了CSS樣式和js的問題。我可以在.htaccess中沒有錯誤嗎?Zf2更改啓動位置
的.htaccess:
RewriteEngine On
# The following rule tells Apache that if the requested filename
# exists, simply serve it.
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [L]
# The following rewrites all other queries to index.php. The
# condition ensures that if you are using Apache aliases to do
# mass virtual hosting or installed the project in a subdirectory,
# the base path will be prepended to allow proper resolution of
# the index.php file; it will work in non-aliased environments
# as well, providing a safe, one-size fits all solution.
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}/public/index.php [L]
你可以顯示你的.htaccess嗎? –
已編輯帖子 – Sewek
和你的問題是什麼?你能更精確嗎? –