How to change query string with pretty URL in WordPress using .htaccess file


I want to create a SEO friendly URL in WordPress, i am developing a site in WordPress it has several custom pages with custom PHP Script.
I am sending data in id=”some text” and matching this text from my database when i GET[‘id’] the parameter.
i already selected my setting from dashboard.

Post name 

I have Currently this URL”some text”

and Now i want this one
I have modify my .htaccess file here is my code.

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^parent-page/child-page/([a-zA-Z0-9]+)/$ parent-page/child-page/index.php/?id=$1
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

i don’t know why its not working

, Shehzad Ahmed 6 years 2017-07-18T06:04:23-05:00 0 Answers 69 views 0

Leave an answer