• Building a site that we want the home page controlled by it (main page will be the main blog page as well as the site home); it should also control a couple other pages such as the contact us page and the about us page.

    However, we don’t want it to control any of the other pages. Seems easy enough, but problem is wouldn’t wordpress’ rewrite code in the .htaccess file take control of all pages in the root of the site?

    We want to control the other pages ourselves via .htaccess and currently use this rewrite code in our .htaccess file..

    RewriteEngine On
    Options +FollowSymlinks
    RewriteBase /
    RewriteRule ^browse/([0-9]+)/[a-zA-Z-]+/? browse.php?sport_id=$1
    RewriteRule ^browse/([0-9]+)/([0-9]+)/[a-zA-Z0-9-]+/? browse.php?sport_id=$1&year_id=$2&type=set
    RewriteRule ^set/([0-9]+)/[a-zA-Z-]+/[a-zA-Z0-9.-]+/([a-z_]+)/? set.php?set_id=$1&type=$2

    However if we moved the site to WordPress how can we continue to make use of this without WordPress overriding it?

    Additionally, even if we were able to overwrite it, I’m concerned about the code being wiped if WordPress regenerates it’s .htaccess file for some reason.

    Is it possible to do what we want to do? Only thing I can think of is storing WordPress in a sub-directory but then doing some rewrite code that rewrites people that go to certain pages such as the home page of the site to the sub-directory where WP is installed?

    Thanks!

  • The topic ‘Having WordPress control only certain pages with .htaccess?’ is closed to new replies.