Same as me. On our system, We use 'AliasMatch' option to match URL to local directory (user's home directory), without modify 'DocumentRoot' option.
Code: Select all
AliasMatch ^/user/([a-zA-Z0-9\_\.]*)/?(.*) /home/user/$1/public_html/$2
I have modified 2 files to fix this problem.
index.php
Code: Select all
public static function url($location = '') {
return 'http' . (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'] . str_replace('/index.php', '', $_SERVER['SCRIPT_NAME']) . '/' . $location;
}
This function returns path based on URL not 'DocumentRoot'.
.htaccess
Code: Select all
Options -Indexes
ServerSignature Off
RewriteEngine on
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
RewriteRule ^.*$ - [E=CWD:%2]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ %{ENV:CWD}index.php?page=$1 [QSA,L]
RewriteRule database.js - [F]
Using url_rewrite without knowing RewriteBase.
ref:
http://www.zeilenwechsel.de/it/articles ... eBase.html