0
我通過在htaccess文件下面的代碼重寫我的投資組合網站網址,我需要什麼樣的htaccess規則來容納文件夾中的文件?
RewriteEngine On
RewriteBase/
#remove enter code here.php; use THE_REQUEST to prevent infinite loops
RewriteCond %{THE_REQUEST} ^GET\ (.*)\.php\ HTTP
RewriteRule (.*)\.php$ $1 [R=301]
# remove index
RewriteRule (.*)/index$ $1/ [R=301]
# remove slash if not directory
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*)/ $1 [R=301]
# add .php to access file, but don't redirect
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
的所有作品,直到我想從 的博客-post.php中頁面導航到另一個頁面,例如,讓我說我想去的網頁成爲cgarcia.design/web/about關於頁面,它應該是cgarcia.design/about所以頁面可以正常加載。 現在我需要在htaccess文件中更改以適應文件夾內的文件?
我的導航結構如下
- 工作
- 約
- 簡歷
- 博客 - 帖子的文件夾 - 進入
- 接觸
感謝您的任何建議。