Hello!
The German-Forum moderator sent me to the english forum, because of my technical "problem". Hope this forum category is the right one and at least one developer is online...
Problem:
When I call a piwigo album by a sub-url, whitch is directed to this album, no CSS-file is loaded.
What I've figured out yet:
FireFox-Sourcecodeeditor shows:
...
<link rel="start" title="Medienserver" href="/" >
<link rel="search" title="Suchen" href="search.php" >
<link rel="stylesheet" type="text/css" href="_data/combined/learzv.css">
...
As far, as good. "_data/combined/learzv.css" is shown as a link, so I clicked on it - cause the CSS-file is missing.
Result:
...
<link rel="start" title="Medienserver" href="/_data/combined/" >
<link rel="search" title="Suchen" href="search.php" >
<link rel="stylesheet" type="text/css" href="_data/combined/iss29s.css">
...
Hey, very interesting...??? The changes are located in the sourcecodeeditor, directly after clicking...
My godness, technic, software, who knows exactly what will happen... so, also clicked on the link "_data/combined/iss29s.css":
...
<link rel="start" title="Medienserver" href="/_data/combined/_data/combined/" >
<link rel="search" title="Suchen" href="search.php" >
<link rel="stylesheet" type="text/css" href="_data/combined/2pthny.css">
...
What's up? Again sonmething new?
Going on with that "method", I don't show the protocol here. "_data/combined" is always con... on link rel="start". Like a worm...
I was a pogrammer in an other life, at dinosaurs lifetime: look like a recursive call, that doesn't find the exit...
This behaviour appears with the URL "gekko.web-poi.de". This URL is directed to "http://mh.web-poi.de/index.php?/category/1". On typing "http://mh.web-poi.de/index.php?/category/1" in the browsers adress-line, the CSS-file is loaded.
OK. The redirection to a subdomain on the same (installation-)domain could cause the idea of a recursion. So I set up another URL with the external target "http://mh.web-poi.de/index.php?/category/1". Same behaviour, the CSS-File isn't loaded.
So, no recursion. Clicking on FireFoxs "Web-Developer". A console appears with an interesstig message:
...
[11:34:35.617] Stylesheet http://gekko.web-poi.de/_data/combined/learzv.css wasn't loaded, cause of his MIME-Typ, "text/html", insetad of "text/css". @ http://gekko.web-poi.de/
...
>> I translated the message...
Hey! Counter-Check: With "http://mh.web-poi.de/index.php?/category/1" as URL in the browsers adress line this message doesn't appear. Why ever. Both terms are directing to the same target. OK, Technical...
Searching the internet and in the root-directory of "Pi, we go!" ;-) - Instaltion a .htacess established with this line within:
AddType text/css .css
Looks good - doesn't work...
And know it's up to you, developer of this great software "Piwigo" (that's NOT a satirical hint... I work fine with this stuff, thank you, I've donated already...)
How comes MIME-Type of "learzv.css"(runtime-generated CSS? My theme-css is found within...) to "text/css"?
Tried this and those, without an effort... as I said: programmer in dinosaurs ancient, so, not really a programmer...
Thanks, regards and please appologize my horrible english...,
VH
Offline
Hi
How technically did you set up your redirection?
Offline
your redirection is poorly written. Is not only the css but also images, javascripts that are redirected without the path.
examples:
http://gekko.web-poi.de/themes/default/ … loader.gif
http://gekko.web-poi.de/galleries/GEKKO … /GEKKO.png
http://gekko.web-poi.de/themes/default/ … .js?v2.5.2
all go to the piwigo main php script
Offline
HI!
Sorry for my late reaction - just forgotten to check the subscribe-button (I thought I checked it in my profile as a standard, anyway...)
First of all: Thanks for your answers. But... I don't understand... sorry:
@flop25: What do you mean with "technically"? On my provider-account at strato.de I can set up subdomains. And for a sub-domain I can set direction targets: internally (means: just a directory on my hole server - I can't define files like "index.php?...") or an external target: http://mh.web-poi.de/index.php?/category/1. On the external way I can choose a test-button to figure out, if the URL is valid. Using this test, the page is shown correctly. The same URL in the FireFox adress-line and no content or css will have any effect.
@rvelices: What's a "poorly written redirection"? "http://mh.web-poi.de/index.php?/category/1" seems to have all what a URL needs, hasn't it? And: I guess the message <<Stylesheet http://gekko.web-poi.de/_data/combined/learzv.css wasn't loaded, cause of his MIME-Typ, "text/html", insetad of "text/css">> seems to me to have no more question about the reason for no css-effects. OK, images, javascripts and all that stuff that doesn't get into effect... well. BUT: On the test-Button, it works! I don't understand that...
So, how can I get my redirection "rich"? How to augment it?
Thanks and regards,
VH
EDIT:
Sorry.. that wasn't right what I said: http://mh.web-poi.de/index.php?/category/1 works well in the FireFox adress-line, but gekko.web-poi.de (in my simple mind just an alias for http://mh.web-poi.de/index.php?/category/1 without getting lost of information...) doesn't work. May that's the meaning of "poor"... So, my thought was, that the URL gekko.web-poi.de will work because of the external target - but that doesn't appear in the adress line... something in that way? OK, specialists: Got a chance using .htaccess to "show" piwigo the URL "http://mh.web-poi.de/index.php?/category/1" by using gekko.web-poi.de? I check that myself, too, I meant to remeber there was a topic a few month ago I was read...
But... When I use gekko.web-poi.de, ... checking... Ok, got it: "http://mh.web-poi.de/index.php?" generates the same result - so, in my redirection the parameters are getting lost, I think! OK, may be -if there's no .htaccess solution- I will redirect gekko.web-poi.de to an internal directory with an index.html and set in there the meta tag for refresh/redirect to "http://mh.web-poi.de/index.php?/category/1".
That will work, I think... to late now for a test...
Last edited by VH (2013-11-02 19:33:27)
Offline
that's not a problem related to Piwigo
It's the way the sub domain has been set: you should investigate to know how exactly it has been done (what's in the htaccess, the dns rules)
Offline
Hello again... :-)
At least, I solved my quest. Thank you for your hints and suggestions!
Exactly, it wasn't a Piwigo-problem (How could that ever be, anyway...;-})
For those, who might be in a similar situation, here my solution:
0: piwigo ist installed under /piwigo and the suitable URL is http://mygallery.fr, for example.
1. Create a directory, to which your subdomain is directed (exp.: myalbum.mygallery.fr is directed to /piwigo/forwarder/myalbum.php)
2. in this directory, a file myalbum.php has to be found!
3. myalbum.php contains PHP-Code only, looks something like this (copy the address-line of your wanted album/subalbum, what ever):
<?php
header('Location: http://mygallery.fr/index.php?/category/1');
exit;
?>
4. If your provider doesn't support a redirection to a file, try to use a directory piwigo/forwarder/myalbum with an index.php within which contains the php-code. I didn't testet that, but I think it'll work.
That's all. Calling myalbum.mygallery.fr calls http://mygallery.fr/index.php?/category/1.
Thus, it's just an abbreviate call of a specific album (hope on a correct usage of the terms "gallery" and "album" in the Piwigo meanings...)
May be there's a more elegant way using .htaccess. But my knowledge to just to poor, even I don't know what searching for.
Thanks and bye till next time,
VH
Offline