mod_rewrite? (5 posts)

  1. tresero
    Posted 8 years ago #

    I am moving from a site (non-wp) that uses /articles/article-name for all of its content.

    How can I get WP to redirect any /articles/ content to /. The articles have different file names and there are many of them, I don't want to use a .htaccess file for all 200 articles.


  2. Chris_K
    Posted 8 years ago #

    Have you checked out Permalinks yet?

  3. tresero
    Posted 8 years ago #

    Unfortunately that won't work. The exact urls are /articles/article-name. I am trying not to break links when I change to WP.

    I tried:
    Redirect permanent /articles/ http://learningaboutstuff.com/
    That didn't work
    I also tried:
    RewriteRule ^/articles/?$ http://learningaboutstuff.com/ [R=permanent,L]

    I could make a 401 that redirects all bad requests to the index page, but that is not a good solution.

  4. Chris_K
    Posted 8 years ago #

    So... going back to Permalinks (check out that link), you can do custom permalinks.

    Like, say, enter /article/%postname% in the custom field.

    I'm probably missing the point, but why mess around in .htaccess if you can get a custom permalink style that is the same style?

  5. tresero
    Posted 8 years ago #

    Sorry, I misunderstood. As I said I am new to Apache and wordpress.

    Thanks for the information, this will make life easier.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.