Support » Fixing WordPress » Problems with redirects

  • piemanji


    I’m having some trouble with rewrites in WordPress, and hoping someone can help me. Basically I would like the post which is currently accessed at to instead be accessed at

    I have been able to make it so that /my-subdirectory/post-title redirects to /post-title, but I want the URL to show as /my-subdirectory/post-title instead.

    My .htaccess currently looks like this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule my-subdirectory/post-title index.php?page_id=4159 [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    I did try this:
    RewriteRule my-subdirectory/post-title post-title [L]

    But that doesn’t seem to work at all. Any ideas?

  • The topic ‘Problems with redirects’ is closed to new replies.