Reputation: 99
I'm trying to rewrite my WordPress post's URL which is currently:
http://example.com/posts/titleofpost
to
http://example.com/titleofpost
What am I doing wrong by chance?
RewriteEngine On
RewriteRule ^posts/(.+)$ title=$1 [L]
I have a feeling that the title=$1
is wrong, and should be some different expression? What could this expression be?
Upvotes: 1
Views: 40
Reputation: 121
RewriteEngine On
RewriteBase /
RewriteRule ^posts/(.+)$ $1 [R=301,L]
Upvotes: 3