我想在Wordpress中做一個自定義的重寫小節。htaccess Wordpress中的RewriteRule
我得到了頁http://example.org/blabla,我想在同一頁上,但在paramater的「QWERTY」重定向http://example.org/blabla/qwerty。
其實我得到這個:
Options +FollowSymLinks
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
而且我想補充一點,下RewriteBase/
RewriteRule ^blabla/(.*)$ /index.php?post=1024&myparam=$1 [NC,L]
但它不工作。有人可以幫我弄這個嗎? post = 1024是我的wordpress管理面板中「blabla」頁面的帖子ID。
謝謝。
這不適用於mod_rewrite規則。您將需要使用WP重寫API來完成它。 – anubhava