0
我希望能夠進入到下列網址:htaccess的根/子文件夾和根/子/成根/ subfolder2 /子/
https://mydomain.com/fork 或 https://mydomain.com/fork/
而對於既要轉到一個叫做子文件夾
https://mydomain.com/prod/fork_contents/index.html
但仍僅顯示https://mydomain.com/fork(或https://mydomain.com/fork/,無論哪種方式)
我想的index.html作爲根所以所有的圖片鏈接等仍然有效(它們是相對於「/生產/ fork_contents /」)
目前在根的.htaccess是:
ErrorDocument 404 /live/site_documents/document404.html
ErrorDocument 403 /live/site_documents/accessDenied.html
Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d [OR]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^fork$ /fork/index.html [L,QSA]
RewriteRule ^fork/$ /fork/index.html [L,QSA]
RewriteRule ^fork/(.*)$ /prod/forklift_contents/$1 [L,QSA]
- https://mydomain.com/fork/工作正常!
- https://mydomain.com/fork不起作用。 index.html加載,但無法找到任何文件。 Firebug的網絡面板報告了下面的'https://mydomain.com/css/style.css not found'。所以第二種情況(沒有尾隨/)似乎不知道進入https://mydomain.com/fork/css/style.css。
想法?