0
我的主題上有一個自定義頁面,它根據給定的參數顯示不同的頁面。該頁面被設置爲網站的主頁。 有效參數組合可以如下:WordPress的重寫規則
my_domain/?fa={action}&type={type}
my_domain/?fa={action}&id={type}
my_domain/?fa={action}
我想要做的就是將這些鏈接轉換爲以下幾點:
my_domain/fa/{action}/type/{type}
my_domain//fa/{action}/id/{type}
my_domain/fa/{action}
我的.htaccess文件現在看起來是這樣,但它似乎沒有工作:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteRule ^fa/(.*)/type/(.*)$ /index.php [L]
RewriteRule ^fa/(.*)/id/(.*)$ /index.php?fa=$1&fid=$2 [L]
RewriteRule ^fa/(.*)$ /index.php?fa=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
我在做什麼錯在這裏?
感謝, 拉杜