我想删除这两个文件夹:我的网站的url中的'folder1s'和'folder2',以及php的扩展名,但它不会对我的.htaccess文件生效。.htaccess无法隐藏网址中的文件夹
http://www.example.com/folder1/folder2/are_string_beans_all_right_on_the_candida_diet.php
转换
http://www.example.com/are-string-beans-all-right-on-the-candida-diet/
这里是我的.htaccess文件
DirectoryIndex index.php
AddDefaultCharset utf-8
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule^http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php/?$/[L,R=301,NC]
RewriteRule ^((?!folder1/folder2).*)$ folder1/folder2/$1 [NC,L]
嗨,它给500内部服务器错误。 – user2689182