• I have a website set up with CodeIgniter and I want most of the site to stay the same, but I am adding wordpress for some pages. Right now I have a script that checks if the page should use wordpress, and if so includes the index.php file for wordpress and then exits after wordpress is done. If I type in my.site/wp-admin I am redirected to my.site/wordpress/wp-admin and that works fine, but if I type in anything else like my.site/page-A I just get a wordpress page not found error. The method recommended by wordpress involves adding a .htaccess file to redirect everything to the sub directory, but that would interfere with the rest of my website. How can I get wordpress to find and display the proper page?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    one of solution I can think of now, is you can validate the URL in you script which check should it use WordPress or no.

    If its not a valid URL, then you can redirect it to 404 page of your and it will not render 404 of WP.

    The best way to do it is to set the permalinks in the WordPress admin, and that will generate the required .htaccess file in the sub-folder that will let you control the URL’s for WordPress in that sub-folder.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Installing wordpress in a subfolder’ is closed to new replies.