Forums

[resolved] Rewrite rule syntax (3 posts)

  1. prazim
    Member
    Posted 2 years ago #

    I am modifying my blog so that the url will now be mysite.com/permalink rather than mysite.com/wordpress/permalink

    I have a large number of existing posts so need to implement a rewrite rule to ensure that anyone who clicks a link somewhere for the old uri will be redirected automatically to its new location.

    I understand this needs to go in my htaccess file but need to confirm the syntax.
    many thanks,
    Sue

  2. webjunk
    Member
    Posted 2 years ago #

    Do a search on Google for:

    htaccess redirect 301 directory

    You will have to write much of the actual code yourself for your specific pages/permalinks. Or else just redirect the directory to your new Home page in WP.

  3. prazim
    Member
    Posted 2 years ago #

    many thanks. did the search you suggested and found the solution:

    this is what I needed, and it works:
    RedirectPermanent /foo http://foobar.com/foo

    should anyone come across this thread.
    Sue

Topic Closed

This topic has been closed to new replies.

About this Topic