私はPHP
のURLを変更する方法を知っていますが、私はWordPressの専門家ではありません。かわいいURLのためにwordpressの.htaccessを使ってGET変数を変更する方法
私はこのURLがあります
domain.com/parent-page/child-page-here/?id=SomeText
を、私はこの
domain.com/parent-page/child-page-here/Someテキストをしたい:
私は.htaccess
を変更ここでは機能しません。.htaccess
コード
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
RewriteEngine On
RewriteRule ^parent-page/child-page/([0-9a-zA-Z]+) parent-page/child-page/?id=$1 [NC,L]
私はparmalinkのpost-nameを使用しています。私はID = "テキスト"でデータを送信しており、カスタムページ$ _GET ["'id"]からデータを取得してこの値をデータベースに送信して –
のURLを.htaccessファイルから変更する方法を教えてください。今すぐRewriteRule^parent-page/child-page /([a-zA-Z0-9 - ] +)/?$親ページ/子ページ/ index.php /?id = $ 1 [L] –