1
與此代碼和乾淨的URL像(example.com)我可以添加www和刪除在URL中的ID。htaccess代碼刪除www和id和php的子目錄
RewriteEngine On
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?id=$1 [L]
RewriteCond %{THE_REQUEST} ^GET\ /(.*/)?(?:index\.php)?\?id=([^\s&]+) [NC]
RewriteRule^/%1%2? [R=301,L]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule^http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
但現在我的網站的根目錄是在一個文件夾中。
所以我的新的URL www.examole.com/newfolder
如何添加newfolder頂部的代碼?