6

We had a site developed using on ruby on rails. It had

  1. Website
  2. Web services for mobile app
  3. Admin panel to manage data.

We started using wordpress to manage site content. We have finished development, have to move to production now. This is the current virtual host code for wordpress to work under /wordpress URI.

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

I want to make phusion passenger work for the /admin and /api URIs. And / to go to wordpress.

Can we change the document root based on the URI? or any other better solution?

1 Answer 1

0

If you have wordpress working in '/' as opposed to /wordpress/ and /admin and /api as passenger I guess you need to stop the wordpress RewriteRule from passing the request to wordpress itself, in which case you can use a negative lookahead. Something like:

# Rewrite everything not starting with /admin or /api to wordpress controller RewriteRule ^/(?!admin|api) /wordpress/index.php [L] 

I'm my description of your requirement is not correct then please expand on your description.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.