WordPress.org

Ready to get started?Download WordPress

Forums

Help Changing URL With Mod Rrewrite After Permalink Change (4 posts)

  1. smashingred
    Member
    Posted 7 years ago #

    I changed my permalink structure to be

    /%postname%/ from /%year%/%month%/%date%
    /%postname%/ and can't seem to get a mod rewrite rule to fix this.

    It is a relatively young blog and so for the popular links I just made Redirects to the new URI but I want to clean up my .htaccess file and use just small a rule. I have tried the following:

    RewriteRule ^/blog/[0-9]{4}/[0-9]{2}/[0-9]{2}/([^/]+)/?$ /blog/$1/

    I am not sure where this should go (before or after the WP rule), if it is 100% correct and if it can even work. it seems as if it should but I am just getting my feet wet in RegEx and mod_rewrite syntax. Please help. Please!

  2. fool4Christ
    Member
    Posted 6 years ago #

    I've spent a few hours experimenting with Regex and mod_rewrite, searching this forum and others... Still no look.

    I'd really like to shrink my permalinks from being date & name based to being simply date based, as smashingred mentioned above.

    From: /%year%/%month%/%date%/%postname%/
    To: /%postname%/

    Anyone have any ideas? (10 months and the above post hasn't even gotten a reply... :\ Perhaps I shouldn't hold my breath.)

  3. fool4Christ
    Member
    Posted 6 years ago #

    No one has any ideas?

  4. fool4Christ
    Member
    Posted 6 years ago #

    Found a solution and blogged it, if anyone's interested.

Topic Closed

This topic has been closed to new replies.

About this Topic