0
我想從網站的url中刪除'articles'和'artificial'文件夾,但是當我嘗試將重寫規則引入.htaccess文件時,我收到錯誤。url重寫刪除文件夾.htaccess
http://www.example.com/articles/artificial/are_string_beans_all_right_on_the_candida_diet.php
試圖轉換
http://www.example.com/are_string_beans_all_right_on_the_candida_diet.php
這裏是我的.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 ^((?!articles/artificial).*)$ articles/artificial/$1 [NC,L]