WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] .htaccess rules after changing permalinks…

[Resolved] .htaccess rules after changing permalinks…

  • I am about to change our permalink structure from:

    /%date%/%postname/

    to

    /static-folder-name/%postname%/

    Obviously this is going to suck for SEO so i was going to write an .htaccess rule to redirect our old posts to the new url structure.

    However I pretty thick with regards to .htaccess rules, so does anyone have idea of what rule i should write?

    Any help would be appreciated.

    Thanks

Viewing 1 replies (of 1 total)
  • Just incase anyone else comes across this problem, here is the solution:

    # .htaccess in DocumentRoot
    RewriteEngine on
    RewriteRule ^/?\d{4}-\d{2}-\d{2}/([-a-zA-z0-9_]+)$/static-folder-name/$1/ [L]

Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] .htaccess rules after changing permalinks…’ is closed to new replies.
Skip to toolbar