Support » Requests and Feedback » Redirect to a wordpress page using Rewrite rules

  • I have wordpress in a sub directory wpblog, and you would get it by typing “” into your browser.

    I want to redirect from a page “” to “”, where testtopic is a page in the blog.

    I have permalinks enabled and allowed wordpress to write a .htaccess file into wpblog.

    To do this I tried this:

    I added a .htaccess file to the root directory (where test.html would be located) of this form:

    RewriteEngine on
    RewriteRule ^test\.html$ /wpblog/testtopic

    A request of the form “” now goes to wpblog, but gives a ‘404 not found’ – page, themed by my wordpress theme setting.

    I can’t work out exactly why this happens. To me it looks as if the wordpress generated .htaccess redirects EVERY url with the base wpblog to /wpblog/index.php, and then wordpress internally resolves which pages it should bring up. But why can’t it resolve /wpblog/testtopic this way? (I can type “” directly into the browser I get the correct page.) Or does wordpress try to make sense of “test.html” which in fact does not exist in wpblog.

    I am mystified, and yes, I have searched the support forums.
    (To be honest I don’t have much hope to get this answered, given that there are loads of unanswered topics when you search for ‘rewrite permalinks’).


  • The topic ‘Redirect to a wordpress page using Rewrite rules’ is closed to new replies.