clean url does not work

General questions about CMSimple
sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 1:54 pm

ok, problem nach noch mehr herumprobieren gelöst. die anweisung zu punkt

3)
"If CMSimple is running in a subdirectory you have to say

Code: Select all

$cf['urlrewrite']['base']="/subdirectory/";
instead. "

ist das problem, bzw. meine interpretation derselben ;). da ich auf meinem webspace noch andere domänen hoste, liegt die cmsimple-installation für http://www.diasdigitalisieren.info nicht im root, sondern in einem entsprechenden verzeichnis auf dem webspace. das habe ich auch brav in die config.php eingetragen, war aber falsch :(

mit

Code: Select all

$cf['urlrewrite']['base']="/";
läuft's jetzt :)
jetzt probiere ich mal die punkte 5-7 aus und hoffe, dass auch das klappt :)

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: clean url does not work

Post by Till » Fri Feb 13, 2009 2:17 pm

I changed the rewrite rule. Does it work with this one?

Code: Select all

RewriteEngine on
# To prevent loop:
RewriteCond %{REQUEST_URI} !index.php
# Do not rewrite requests to template or images dir:
RewriteCond %{REQUEST_URI} !templates
RewriteCond %{REQUEST_URI} !images
#RewriteRule ^(.*)\.html$ ./index.php?$1
# Do not rewrite requests with any query strings:
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.*)\.html$ ./index.php?$1 
#RewriteRule ^(.*)\/(.*)\.html$ ./index.php?$1:$2
Till

sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 2:50 pm

hey till,

thanks for rewriting the rewrite rule! the system is generating clean nice urls now, like http://diasdigitalisieren.info/Download.html. this works for h2 and h3 as well.

but there is some new and quite interesting behaviour. when i click on any h2 or h3 entry like http://diasdigitalisieren.info/Scanbuch ... rlage.html the header image disappears, there is only white space instead of the image you see when you are on h1 level.

this happens with the old htaccess file from the wiki http://www.cmsimplewiki.com/doku.php/ti ... /clean_url as well as with your new version. any idea how this is possible?

p.s. here just a hint for anybody else who want to apply clean url to an existing system:
any special characters like ":" or "?" in the headings are not supported any more, after you applied clean url. the default cmsimple can handle them, but with clean url you get error messages then!

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: clean url does not work

Post by Till » Fri Feb 13, 2009 2:52 pm

With the changed rewrite rule I could get it to work again. You can see it here: http://www.nmud.de/cmsimple2.
But it does not work on multilingal websites. There are still problems with the language flags.

Till

sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 3:00 pm

hi till,
your system shows same behaviour, as mine. on h1-level there is another header image, than on h2+h3 level. how come? before applying clean url there was one header image for all three levels. :?

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: clean url does not work

Post by Till » Fri Feb 13, 2009 3:03 pm

sascha wrote:but there is some new and quite interesting behaviour. when i click on any h2 or h3 entry like http://diasdigitalisieren.info/Scanbuch ... rlage.html the header image disappears, there is only white space instead of the image you see when you are on h1 level.

this happens with the old htaccess file from the wiki http://www.cmsimplewiki.com/doku.php/ti ... /clean_url as well as with your new version. any idea how this is possible?
Yes, it is now looking for top Background image at the wrong position. it looks at:
http://diasdigitalisieren.info/Scanbuch ... sieren.jpg
instead of:
http://diasdigitalisieren.info/template ... sieren.jpg

So, you have to use complete links in your css file!

And there is another point to make. The whole stuff wont work with Umlaute!!!

Till

sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 3:13 pm

ok, that's interesting. but how can we tell the system to get back to old behaviour? as it is quite impossible to save an extra image for every h2+h3 entry this would be great.

at the moment you either

a) can us clean url only with websites that have h1-entries, but no h2 or h3 entries, or
b) get back to the old default configuration of the urls, and nobody wants that
:shock:

sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 3:15 pm

ok, was too fast with my reply, you gave me the answer already
"So, you have to use complete links in your css file!"
i try to find it in my template

sascha
Posts: 20
Joined: Fri Feb 13, 2009 5:49 am

Re: clean url does not work

Post by sascha » Fri Feb 13, 2009 3:25 pm

i searched the css, but could not find an entry for the header image. in the template.htm there is one

Code: Select all

</table>
      <table width="100%" height="150" border="0" align="center" cellpadding="0" cellspacing="0" background="<?php echo $pth['folder']['templateimages']?>top_diasdigitalisieren.jpg">
        <tr> 
as i am not a programmer, can anybody tell me, how we can convert this relative link to the header image top_diasdigitalisieren.jpg into an absolute link?

Till
Posts: 337
Joined: Tue May 20, 2008 7:20 am
Location: Germany: Bremen
Contact:

Re: clean url does not work

Post by Till » Fri Feb 13, 2009 3:31 pm

With all these changes the variables which define paths don't work anymore properly. In your case you have to say:

Code: Select all

<table width="100%" height="150" border="0" align="center" cellpadding="0" cellspacing="0" background="http://diasdigitalisieren.info/templates/phase2_club/images/top_diasdigitalisieren.jpg">

Till

Post Reply