我的问题是这样的,我想要例如:
使 www.mywebsite.com/index.html 看起来/出现(不重定向)像这样 www.mywebsite.com/index/
到目前为止,我使用了下面的代码,只获得了 www.mywebsite.com/index 的外观。我将强调我不想重定向,我只想到 html 看起来像文件夹
我在 Adobe MUSE 工作。我建立网站主要是为了好玩,只想专注于设计而不是编码
这是我从这里获取的 .htaccess 脚本:.htaccess rewrite /foo/bar/ to /foo/bar.php
请问,有人可以帮我吗?我应该更改哪些行以具有文件夹外观谢谢
Options -MultiViews
RewriteEngine On
RewriteBase /
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Za-z]{3,}\s([^.]+)\.html [NC]
RewriteRule ^ %1 [R,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}/$1\.html -f
RewriteRule ^(.+?)/?$ $1.html [L]