Search…

X3 Photo Gallery Support Forums

Search…
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

v0.5 - Installation in subfolder of webspace

01 Dec 2014, 13:11

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: v0.5 - Installation in subfolder of webspace

01 Dec 2014, 13:21

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>
 
RBachmann
Experienced
Topic Author
Posts: 42
Joined: 20 Jun 2012, 17:15

Re: v0.5 - Installation in subfolder of webspace

01 Dec 2014, 15:21

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 ?
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: v0.5 - Installation in subfolder of webspace

02 Dec 2014, 00:33

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.
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13993
Joined: 30 Sep 2006, 03:37

Re: v0.5 - Installation in subfolder of webspace

02 Dec 2014, 05:13

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