.htaccess - 301 redirect help after changing Wordpress permalinks from postname to post_id -


i have searched here, wordpress.org , wider internet, information can find opposite of i'm trying achieve.

i have taken on maintenance of large 10-year old wordpress site (v.4.5.3) 3,000 posts, 100 pages , 5,000 unique hits per day, , want change permalink structure because old 1 no longer appropriate.

the present permalink structure /%category%/%postname%.html

we want change /%post_id%

as second choice, reverting default /?p=123 format acceptable.

the problem is, how manage 301 redirects in .htaccess? don't want use plugin if can it, i'd rather manually.

my .htaccess presently follows:

# 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 

any appreciated.


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -