WebFaction
Community site: login faq

I am looking for the best configuration of 3 static php applications that must all start from the same domain name.

my_domain.com/ -- at the root is application number 1 - a wordpress installation with it's own standart htaccess file

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

my_domain.com/site2 is where application number 2 is attached on webfaction (static/php5.4)

DirectoryIndex index.php
<IfModule mod_rewrite.c>
    RewriteEngine On
    Rewritebase /fitlive_rest_api/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
</IfModule>

my_domain.com/site3 is where application number 3 is attached (static/php5.4) with the same htaccess as site2

Now, my_domain.com/ works perfectly for wordpress, my_domain.com/site2 works ,but my_domain.com/site2/anything_else redirects to the root / and gives a 404 error from the root (site1)

my_domain.com/site3 works ,but has same problem as site2

what i want is for / , /site2 and /site3 to be completely independent and all their uri queries and paths to default to / , /site2 and /site3 accordingly.

EDIT

Nevermind guys,read the webfaction documentation and sorted it out with RewriteBase.

So basically i just mirrored the additional applications' .htaccess files like this

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /MOUNT_POINT <-- application mounting point
    RewriteRule ^$ index.php [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

asked 23 Mar '13, 19:13

BLADE92
1113
accept rate: 0%

edited 23 Mar '13, 20:51

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×261
×122
×13

question asked: 23 Mar '13, 19:13

question was seen: 4,039 times

last updated: 23 Mar '13, 20:51

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM