Hi everyone,
I’ve developed an app that will sit on the same server as a running Drupal install and am finding that the rewrite rules for the Drupal site to enable search friendly links is grabbing all the requests.
Here’s what my www root looks like:
webroot
|.htaccess
|myapp
|yii
|drupal files
in my .htaccess file, i’ve got the following in the mod_rewrite section:
stuff to let through (ignore)
RewriteCond %{REQUEST_URI} myapp
RewriteRule (.*) $1 [L]
Rewrite current-style URLs of the form ‘x’ to the form ‘index.php?q=x’.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Rewrite non www url to www url
RewriteCond %{HTTP_HOST} !^www\…*
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{HTTP_HOST} ^([^.]*)\.(ca)
RewriteRule ^.*$ http://www.%1.%2%{REQUEST_URI} [R=permanent,L]
Now if I go to www.mydomain.ca/myapp, i get the default page for my Yii app. If I go to any other url in the app, I get redirected to Drupal, for example: www.mydomain.ca/myapp/site/login, will redirect me to www.mydomain.ca
Can anyone shed any light on this?
Thanks!
james