我的目标是在我的 WP 网站中使用干净的 URL,目前我有以下示例:
例子:
插件名称:= gft_galleries
pageTitle: = 画廊一
http://domain.co.nz/pluginName/pageTitle/
Wordpress 或 .htaccess 中是否有创建以下内容但保留正确结构的内容?
例子:
http://domain.co.nz/galleries/pageTitle
.ht访问
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} ^(www\.)(.*)$ [NC]
RewriteRule ^(.*)$ http://%2/$1 [L,R=301]
RewriteRule ^gft_gallery/(.*)$ /gallery/$1 [L]
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule . index.php [L]