Hallo,
ich habe ein Problem mit der CoolUri Extension. Ich habe die Extension auf Basis von diesem Tutorial eingerichtet.
Meine .htaccess Datei sieht wie folgt aus:
RewriteEngine On
RewriteRule ^(typo3/|t3lib/|tslib/|fileadmin/|typo3conf/|typo3temp/|uploads/|showpic\.php|favicon\.ico) - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php [L]
Im Template habe ich die Extension wie folgt aktiviert:
//############################################
//### CoolUri aktivieren
//############################################
config.simulateStaticDocuments = 0
config.baseURL = blub.de - Informationen zum Thema Blub. Diese Website steht zum Verkauf!
config.tx_cooluri_enable = 1
config.redirectOldLinksToNew = 1
Meine XML Datei sieht wie folgt aus:
<?xml version="1.0" encoding="utf-8"?>
<cooluri>
<urlsuffix>.htm</urlsuffix>
<removetrailingslash>1</removetrailingslash>
<cache>
<usecache>1</usecache><!-- READONLY -->
<params2cool>
<!-- how often (in days) should be links updated (Typo3 cache needs to be cleared) -->
<checkforchangeevery>1</checkforchangeevery>
</params2cool>
<cool2params>
<!-- how many days should old links (those that are redirected to existing) should be kept active -->
<oldlinksvalidfor>365</oldlinksvalidfor>
</cool2params>
<pagenotfound>
<!-- the status has to meet HTTP protocol header -->
<status>HTTP/1.0 404 Not Found</status>
<behavior type="message"><![CDATA[ <h1>Page not found!</h1> ]]></behavior>
<!-- possible @type values:
page - will show a file (loaded using file_get_contents)
redirect - will redirect to a certaing URL
message - will output a message
-->
</pagenotfound>
</cache>
<pagepath>
<!-- first non-empty value will be used -->
<title>tx_realurl_pathsegment,alias,subtitle,title</title>
<saveto>id</saveto><!-- READONLY -->
<default>0</default><!-- READONLY -->
<userfunc>tx_cooluri->getPageTitle</userfunc>
<t3conv>1</t3conv>
</pagepath>
<uriparts>
<part>
<parameter>tx_ttnews[tt_news]</parameter>
<lookindb>
<to>SELECT title FROM tt_news WHERE uid=$1</to>
<!-- if you have news items in different languages in one folder, use this sql -->
<!-- to>SELECT title FROM tt_news WHERE (uid=$1 or l18n_parent=$1) AND sys_language_uid={L=0}</to -->
<t3conv>1</t3conv>
</lookindb>
</part>
<part>
<parameter>tx_eeblog[showUid]</parameter>
<lookindb>
<to>SELECT subject FROM tx_eeblog_maintable WHERE uid=$1</to>
<t3conv>1</t3conv>
</lookindb>
</part>
<!-- you can move cHash to predefineparts to remove in from URL
but first read the manual -->
<part>
<parameter>cHash</parameter>
</part>
<!-- common patterns -->
<!-- this will just add this parameter value to URL -->
<part>
<parameter>paramA</parameter>
</part>
<!-- this will look up parameter value in the database table "sometable" and if found
the value will be transformed using Typo3 csconv into URL-like value.
You can make all sorts of MySQL stuff here, such as add UID into the result:
SELECT CONCAT(title,'-',uid) FROM ...
-->
<part>
<parameter>paramB</parameter>
<lookindb>
<to>SELECT title FROM sometable WHERE uid=$1</to>
<t3conv>1</t3conv>
</lookindb>
</part>
</uriparts>
<predefinedparts>
<part>
<parameter>no_cache</parameter>
</part>
<!-- common patterns -->
<!-- parts defined this way will be removed from URL -->
<part>
<parameter>paramC</parameter>
</part>
<!-- this will prefix a value with "prefix-". Cannot be localized.
-->
<part key="prefix-(.*)" regexp="1">
<parameter>paramD</parameter>
</part>
<!-- if parameter matches value, key will be added to URL
with mutliple values, use valuemaps
-->
<part key="thisWillAppearInUrl">
<parameter>paramE</parameter>
<value>ifParamEMatcesThisValue</value>
</part>
</predefinedparts>
<valuemaps>
<valuemap>
<parameter>L</parameter>
<!-- L is empty of 0, result is empty -->
<value key="">0</value>
<!-- L is 1, result is "en" -->
<value key="en">1</value>
</valuemap>
</valuemaps>
<!-- this will put L param to the first position
for more magic see manual -->
<paramorder>
<param>L</param>
</paramorder>
<!-- READONLY START -->
<cooluris>1</cooluris>
</cooluri>
Wenn ich auf ein Bild Klicke, dann sehe ich folgende URL: http://www.blub.deindex.php/?eID=tx_cms_showpic&file=uploads%2Fpics%2F2_12.jpg&width=600&height=600m&bodyTag=%3Cbo dy%20style%3D%22margin%3A0%3B%20background%3A%23fff%3B%22%3E&wrap=%3Ca%20href%3D%22jav ascript%3Aclose%28%29%3B%22%3E%20|%20%3C%2Fa%3E&md5=5ed5657a65e1ccc279a9ce4d50b46725
Wenn ich nach meiner URL einen \ einfüge (www.blub.de/inde[...]), dann erscheint die Fehlermeldung Parameter Error.
Ich nutze außerdem die Extension SmoothGallery in der Version 1.5.1
CoolUri nutze ich in der Version 1.0.20
Und Typo3 in der Version 4.3.2
Ich gehe sehr stark davon aus, dass der Fehler in meiner CoolURI XML-Datei liegt. Leider bin ich nicht in der Lage rauszufinden, wo es genau hakt. Oder bin ich da ganz falsch?
Gruß