Page 1 of 1

v0.5 - Installation in subfolder of webspace

Posted: 01 Dec 2014, 13:11
by RBachmann
I installed x3 into a subdirectory of my webspace: /public_html/x3

To have my domain point to the installation directly, I use the following .htaccess in my root dir (/public_html/.htacess):

RewriteEngine on
RewriteCond %{HTTP_HOST} ^240.ch$ [OR]
RewriteCond %{HTTP_HOST} ^www.240.ch$
RewriteRule ^(.*)$ /x3/$1 [PT,L,QSA]

This works perfectly for 240.ch but unfortunately, when I enter www.240.ch I'm being redirected to 240.ch/x3. Furthermore, all links are displayed as 240.ch/x3/events/ ... instead of 240.ch/events/ for example. Is this something Imagevue could improve or should I configure my .htaccess file differently? If there is anything I can do, please tell me what :-)

PS: In the panel > settings > site: I've set base_url : http://240.ch
Assumed that this might improve the behaviour but it didn't.

Re: v0.5 - Installation in subfolder of webspace

Posted: 01 Dec 2014, 13:21
by mjau-mjau
Please try to comment out lines 397-401 in your x3/.htaccess file:
Code
#<IfModule mod_rewrite.c>
#  RewriteCond %{HTTPS} !=on
#  RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
#  RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
#</IfModule>

Re: v0.5 - Installation in subfolder of webspace

Posted: 01 Dec 2014, 15:21
by RBachmann
Brilliant, that's much better. Thank you!

Is there any chance that the links of, e.g. "Home" point to the domain instead of the subdirectory?
-> 240.ch instead of 240.ch/x3?

Same goes to (in my case) events -> 240.ch/events instead of 240.ch/x3/events ?

Re: v0.5 - Installation in subfolder of webspace

Posted: 02 Dec 2014, 00:33
by mjau-mjau
RBachmann wrote:Is there any chance that the links of, e.g. "Home" point to the domain instead of the subdirectory?
-> 240.ch instead of 240.ch/x3?

Same goes to (in my case) events -> 240.ch/events instead of 240.ch/x3/events ?
This is quite complicated, because X3 needs to target the x3/index.php application for all URLs, ajax calls and images that it creates. However, let me try something for version 0.6 and I might be able to work it out with a setting.

Re: v0.5 - Installation in subfolder of webspace

Posted: 02 Dec 2014, 05:13
by mjau-mjau
We have added a new settings advanced.path.base pending for 0.6 release, which will allow you to a custom base path. In your case, you would set:
Code
base: 240.ch