1
Hi!
I've have a problem with a solution (also others too as this
thread shows)
The problem is that in some places withing XOOPS (I'm using 2.0.6) that the global PHP_SELF variable is used to create urls (forms,navigation,etc) and configured sites like mine (an maybe more users) that uses apache .htaccess with modrewrite configured to handle multiple domains with only one account.
Let me show my configuration for more clearness:
I own 1 hosting solution that I will call myhost.com, and I also have pointing to this host a couple of more domains.
So domain1.com and domain2.com -> points to myhost.com.
But thanks to modrewrite I change the url for every domainX to a subdirectory withing myhost.com htdocs
I have XOOPS installed in each subdirectory (and, of course, visible from
http://domain1.com and
http://domain2.com)-
Here is my .htaccess:
Quote:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} domain1.com
RewriteCond %{REQUEST_URI} !domain1_com/
RewriteRule ^(.*)$ domain1_com/$1 [L]
RewriteCond %{HTTP_HOST} domain2.com
RewriteCond %{REQUEST_URI} !domain2_com/
RewriteRule ^(.*)$ domain2_com/$1 [L]
That causes to php self to pointo to /domain1_com/index.php but it's needed to point to /index.php.
I changed a couple of scripts from XOOPS (see above forum link), eg: /class/pagenav.php, to use some code like this:
Quote:
$submit_page = $HTTP_SERVER_VARS['REQUEST_URI'];
if(strpos($submit_page,"?")) $submit_page = substr($submit_page,0,strpos($submit_page,"?"));
instead of
Quote:
$submit_page = $HTTP_SERVER_VARS['PHP_SELF']
Am I wrong and should learn more about url rewriting or should change XOOPS developers to use the request uri (without get params) instead of php_self?