Search…

X3 Photo Gallery Support Forums

Search…
 
loungelizard
Topic Author
Posts: 2
Joined: 26 Oct 2020, 09:17

404 after fresh install

26 Oct 2020, 10:02

Hi, I'm trying to switch from Koken to X3 but I am unable to install and successfully work with even the sample installation. It must be a topic related to relative links, but I don't know how to figure out..

I am trying a test installation. The directory on the server is "/webseiten/photos/x3". This is where my test domain is referring to.

I installed with the x3_install.php setup list and it fires up fine with the main page. However, if I now try to access any of the linked pages, gallery or whatever, I get a 404 from my website provider.

For example, a link to the sample gallery landscapes will lead to:
http://www.lounge-lizard.org/galleries/landscapes/

which is not found. If however I manually refer to the correct path of an image: 
http://www.lounge-lizard.org/content/ga ... /wheat.jpg

it is being found.

So somehow I have the feeling that the relative paths are not identified correctly and it is omitting the /content somewhere. But I can not find any setting to change this. Any clues for me?

cheers, florian
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: 404 after fresh install

26 Oct 2020, 11:42

Just to explain briefly how X3 (and most other dynamic website apps) work in regards to pages (urls): X3 uses rewrite rules for pages, which means it will take an URL like /gallery/landscape/ and forwards it to the X3 application /index.php, which then outputs the page based on the request. In other words, /gallery/landscape/ does not actually exist as a folder on server, but it's created from data (images + page.json) stored in /content/gallery/landscape/. IMAGE/FILE urls on the other hand like /content/galleries/landscapes/wheat.jpg will actually exist on the server in that location, because aren't created by X3 (like pages).

So just to get that out of the way, you have some problem with REWRITE RULES, which are stored in the X3 .htaccess file in the root of your X3 website. Normally we can make sure rewrite rules are working from your ?diagnostics page, but I can't see anything from the output. The suspects or things I would check:
  • Is the X3 .htaccess file there in the root of your X3 website, and it is the original X3 .htaccess file?
  • Is your server setup to support .htaccess (allowoverride)?
  • Are you sure you don't have any conflicting rewrite or redirect rules setup on server levels (perhaps from hosting panel)?
For me to personally diagnose further, I would need to ask for FTP login. If you want me to check, please send login details in private message or by email.
loungelizard wrote:Hi, I'm trying to switch from Koken to X3 but I am unable to install and successfully work with even the sample installation. It must be a topic related to relative links, but I don't know how to figure out..
Normally, you would not have to deal with this as X3 would handle the "rewriting" of url's. In your case, there is a problem with "rewrites".
loungelizard wrote:I am trying a test installation. The directory on the server is "/webseiten/photos/x3". This is where my test domain is referring to.
This is a bit suspicious. Normally, the root of your website is always preset like /***/www/public/. Then you install whatever you want in /public/ and that's always your root website. How have you changed the root of your website to /webseiten/photos/x3? This is not normal, and I suspect this is related.
loungelizard wrote:I installed with the x3_install.php setup list and it fires up fine with the main page. However, if I now try to access any of the linked pages, gallery or whatever, I get a 404 from my website provider.

For example, a link to the sample gallery landscapes will lead to:
http://www.lounge-lizard.org/galleries/landscapes/
Yes. Just to be clear, the ROOT (home) page works because it doesn't need to "rewrite" the URL. It simply runs X3's root /index.php files without any rewrite.
loungelizard wrote:which is not found. If however I manually refer to the correct path of an image: 
http://www.lounge-lizard.org/content/ga ... /wheat.jpg
Files/images will also work, because they don't require rewrite. They actually exist physically in that location on server.
loungelizard wrote:So somehow I have the feeling that the relative paths are not identified correctly and it is omitting the /content somewhere. But I can not find any setting to change this. Any clues for me?
/content/ should NOT be part of the url (no reason you would want that), so your url's are CORRECT. The problem is that your servers REWRITE doesn't work, or there is some interference with the method you are using to define the ROOT of your website.
 
loungelizard
Topic Author
Posts: 2
Joined: 26 Oct 2020, 09:17

Re: 404 after fresh install

26 Oct 2020, 17:41

Thanks for the detailled explanation! I believe indeed then I have a topic with my hosting service. I have wandered around the product information and found the following: 
https://www.df.eu/de/support/df-faq/web ... /htaccess/

"Bei der Direktive "AllowOverride" handelt es sich nicht um ein .htaccess-Feature. Sie ist Teil der Serverkonfiguration, und kann daher nicht über die .htaccess-Datei gesetzt oder von Ihnen geändert werden."

stating AllowOverride is not a htaccess feature and as part of the server configuration not being able to change it from customer side...

the website root i believe is hidden as part of the hosting service, they let me configure in the customer level where my domain shall be pointed to and I don't have full server access


I'll share ftp login with you via pm but I'm quite sure the topic is on hosting side just as you explained.

Do you have any pointers as to what I need to discuss with them or any workaround?

br, florian

 
 
User avatar
mjau-mjau
X3 Wizard
Posts: 12765
Joined: 30 Sep 2006, 03:37

Re: 404 after fresh install

27 Oct 2020, 00:40

I believe the problem is fixed:
http://www.lounge-lizard.org/galleries/landscapes/

In your .htaccess file I set the following, which is necessary on some servers:
Code
RewriteBase /
Normally, the X3 diagnostics / installer would detect and do this automatically. However, on your server, there is something preventing X3 diagnostics from auto-detecting this fix.

Nothing wrong with htaccess support at your provider!