Zum Inhalt springen

CoolURI. Probleme mit den Links.

Erstellt am 16. Juni 2011 · Noch keine Antworten

Tags: URLs & Routing, Frage

nabbl ·

Moinmoin aus Kiel!
Ich habe zur Zeit ein kleines Problem: Ich ärgere mich gerade ein wenig mit CoolURI herum.

Zunächst mal meine Configs (man entschuldige die <a>-Tags innerhalb der Config-Files. Die sind selbstverständlich nicht wirklich drin):

Root-Template (Setup):

config.tx_cooluri_enable = 1
config.redirectOldLinksToNew = 1
baseURL = http://www.european-lumber.com/typo/
config.absRefPrefix = /typo/
simulateStaticDocuments = 0

.htaccess:

<IfModule mod_rewrite.c>

# Enable URL rewriting
RewriteEngine On

# Change this path, if your TYPO3 installation is located in a subdirectory of the website root.
#RewriteBase /

# Rule for versioned static files, configured through:
# - $TYPO3_CONF_VARS['BE']['versionNumberInFilename']
# - $TYPO3_CONF_VARS['FE']['versionNumberInFilename']
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ $1.$3 [L]

# Stop rewrite processing, if we are in the typo3/ directory.
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]
RewriteRule ^(typo3/|t3lib/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L]

# Redirect http://example.com/typo3 to http://example.com/typo3/index_re.php and stop the rewrite processing.
# For httpd.conf, use this line instead of the next one:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/index.php [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

# If the file/symlink/directory does not exist => Redirect to index.php.
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Main URL rewriting.
# For httpd.conf, use this line instead of the next one:
# RewriteRule .* /TYPO3root/index.php [L]
RewriteRule .* index.php [L]

</IfModule>

coolUriConf.xml:

<?xml version="1.0" encoding="utf-8"?>
<cooluri>
    <urlsuffix>.html</urlsuffix>
      <removetrailingslash>1</removetrailingslash>
  <cooluris>1</cooluris>

<valuemap> 
    <parameter>type</parameter> 
    <value key="sitemap.xml">776</value> 
</valuemap>
  
  <cache>
    <usecache>1</usecache>
    <params2cool>
      <checkforchangeevery>1</checkforchangeevery>
    </params2cool>
    <cool2params>
      <translateifnotfound>0</translateifnotfound>
      <oldlinksvalidfor>365</oldlinksvalidfor>
    </cool2params>
    <cacheparams>0</cacheparams>
    
    <pagenotfound>
      <status>HTTP/1.0 404 Not Found</status>
      <behavior type="redirect"><![CDATA[/404.html]]></behavior>
    </pagenotfound>
  </cache>

  <pagepath>
    <title>tx_realurl_pathsegment,alias,subtitle,title</title>
    <saveto>id</saveto>
    <default>0</default>    
    <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 -->
        <translatetoif>
          <match>^[0-9]+$</match>
        </translatetoif>
        <t3conv>1</t3conv>
      </lookindb>
    </part>
    <part>
      <parameter>tx_eeblog[showUid]</parameter>
      <lookindb>
        <to>SELECT subject FROM tx_eeblog_maintable WHERE uid=$1</to>
        <translatetoif>
          <match>^[0-9]+$</match>
        </translatetoif>
        <t3conv>1</t3conv>
      </lookindb>
    </part>
  </uriparts>
    
  <predefinedparts>
    <part>
      <parameter>tx_ttnews[backPid]</parameter>
    </part>
    <part>
      <parameter>cHash</parameter>
    </part>
    <part>
      <parameter>tx_eeblog[pointer]</parameter>
    </part>
    <part>
      <parameter>tx_eeblog[backPID]</parameter>
    </part>
    <part>
      <parameter>no_cache</parameter>
    </part>
  </predefinedparts>
  
  <valuemaps>
    <valuemap>
      <parameter>L</parameter>
      <value key="">0</value>
      <value key="en">1</value>
    </valuemap>
  </valuemaps>
  
  <paramorder>
    <param>L</param>
  </paramorder>
  
</cooluri>

Nun zu meinem Problem:
Wenn ich bei den Seiteneinstellungen den Haken reinmache "Seite in Mitte einer URL auslassen" reinsetze, funktioniert alles tadellos. Das möchte ich allerdings nicht. Mir wäre es ganz lieb, wenn die Seite wirklich über die URL
http://european-lumber.com/typo/ueber-igro/sylter-immobilie.html
aufrufen könnte. Das geht im Moment nur bedingt: Zum Einen werden die Bilder nicht gefunden, da diese auf typo/ueber-igro/typo3temp/... zeigen, zum Anderen zeigen alle Links anschließend auf den Unterordner /ueber-igro/link.html, obwohl der link einfach nur /link.html heißen müsste.

Ich hoffe, dass ich mein Problem nachvollziehbar formulieren konnte und hoffe, dass ihr mir helfen könnt :-)

Grüße
Horst