Support » Fixing WordPress » Limit Rewrite to WordPress Directory Only

  • vinhboy

    (@vinhboy)


    I installed wordpress into the /wordpress directory on my site. How do I contain rewriting only to the wordpress directory. For example:

    Ok, rewrite:
    http://example/wordpress/anything-query

    SHOULD NOT rewrite:
    http://example.com/anything-query

    The .htaccess inside the /wordpress directory is:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wordpress/index.php [L]
    </IfModule>

    Thank you in advance.

Viewing 3 replies - 1 through 3 (of 3 total)
  • moshu

    (@moshu)

    Do you have a 404.php file in your theme? That’s what WP is using for non-existing pages; otherwise will take you to the main index…

    vinhboy

    (@vinhboy)

    Sorry, I need to clarify.

    I am not worried about the 404 msg. I am worried that wordpress rewrite rules are applied server-wide, and not just constrained to the /wordpress directory

    I tried changing the rewrite rule to

    RewriteRule ^/wordpress/.*$ /wordpress/index.php [L]

    Also tried

    RewriteRule ^/wordpress/(.*)$ /wordpress/index.php [L]

    And finally,

    RewriteRule ^(.*)/wordpress/(.*)$ /wordpress/index.php [L]

    But none of them worked.

    iridiax

    (@iridiax)

    I installed wordpress into the /wordpress directory on my site. How do I contain rewriting only to the wordpress directory.

    It already is unless you have done this:

    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit Rewrite to WordPress Directory Only’ is closed to new replies.