I need to rewrite the following URL Example.com/hot-presidents.php?celeb=obama&val=big-fan
SOLVED!!!! WordPress Rewrite Rule
12
I need to rewrite the following URL
Example.com/hot-presidents.php?celeb=obama&val=big-fan
into
example.com/obama-hot-presidents/
I am trying to do this in WordPress with the following code.
#WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^([A-Za-z0-9]+)-hot-presidents/$ hot-presidents.php?celeb=$1&val=big-fan [L]
</IfModule>
What am I doing wrong?
Example.com/hot-presidents.php?celeb=obama&val=big-fan
into
example.com/obama-hot-presidents/
I am trying to do this in WordPress with the following code.
#WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^([A-Za-z0-9]+)-hot-presidents/$ hot-presidents.php?celeb=$1&val=big-fan [L]
</IfModule>
What am I doing wrong?
- ToneUK
- [1] reply
- ToneUK
- [1] reply
- Christian Little
- [ 1 ] Thanks
- [2] replies
- SteveJohnson
- [ 1 ] Thanks
- [1] reply
- xtrapunch
- g36
Next Topics on Trending Feed
-
12