I have a WordPress site running in an apache server, I want to rewrite some the URL in SEO friendly manner, so how to do that
Currently, I have this URL
www.example.com/about-us/?id=what_we_do_1
www.example.com/about-us/?id=why_us
I want it like
www.example.com/about-us/what-we-do-1
www.example.com/about-us/why-us
and for this
www.example.com/media/?id=team
www.example.com/media/?id=abc_xyz
I want something like this
www.example.com/media/team
www.example.com/media/abc-xyz
my current .htaccess is like the below
# 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
2
Answers
To convert urls like
/index.php?p=test
to
/index.php/test
Thus in your case
Similarly for other pages
You can try these to convert underscore to dash :-
After that for another url :-
1) http://www.example.com/about-us/?id=what_we_do_1
htaccess rule will be :-
It may help you.