I have a WordPress application mapped to the path '/' on my website. I want to add a subdirectory of non-WordPress PHP files. Ideally this directory could be located elsewhere on the filesystem, as it's part of a git repository.
I've tried making a symlink:
in the hope that accessing www.mydomain.com/subdirectory/index.php would display /home/username/project/public/index.php . But my WordPress .htaccess file (shown below) redirects to the top-level of my domain.
And I've tried using mod_alias in my .htaccess file but it appears this isn't allowed. I'd have to do this in the Apache conf, but the WordPress app doesn't seem to have one.
Any ideas how I can achieve this?
Here's my current .htaccess file, which I'm barely understanding:
asked Oct 13 '11 at 07:26
You need to create a new symlink app using the control panel, named for example public_files, pointing to your /home/username/project/public folder.
Then, in your control panel again, you can edit your website record that your wordpress is being served and add that app to be served from the /subdirectory path of your domain.
Now, when a request cames for mydomain.com/subdirectory then our frontend nginx server will route it to that app instead of your wordpress blog.
Bare in mind that nginx should have at least read access to your /home/username/project/public folder in order to read and serve the files right.
answered Oct 13 '11 at 07:59