WordPress.org

Ready to get started?Download WordPress

Forums

Pretty Permalinks Cause my Non-WordPress Pages to Give 404 (2 posts)

  1. enposte
    Member
    Posted 6 years ago #

    I use WordPress 2.3.1 as part of a bigger site and have it installed in its own subfolder.

    At the root, I have an .htaccess which does url rewrites for the non-wordpress part of the site.

    The rewrites work great for non-wp until I enable pretty permalinks. They continue to work but the custom rewritten urls give 404 responses.

    I use the same index.php to power the whole site. Could wordpress be issuing the 404 headers?

    Now I have disabled the permalinks until I find a solution.

    My non-wp rules are like this:

    # Add Trailing Slash
    RewriteRule ^items/([-a-z0-9]+)$ /items/$1/ [NC,R=301,L]

    # Main Rewrite Rule
    RewriteRule ^items/([-a-z0-9]+)/?$ /index.php?page=items&item=$1 [NC,QSA,L]

    As you can see, the custom rules are fairly standard stuff, and are kept in their own htaccess at the root. I don't know why wordpress, which is in its own subfolder, should interfere with them.

    Appreciate your ideas.

  2. JohnL
    Member
    Posted 6 years ago #

    enpost, there was discussion of a similar arrangement at

    http://wordpress.org/support/topic/104126

    that might be helpful. Benoitbis was not using other rules, but he was maintaining WP in a subordinate directory and running pages from the root directory where there was an .htaccess file.

Topic Closed

This topic has been closed to new replies.

About this Topic