Hallo zusammen,
ich möchte gerne meine Webseite von Simulate Static Documents auf RealURL umstellen. Leider funktioniert das überhaupt nicht. Ich habe zunächst Simulate Static deinstalliert. Dann RealURL installiert. Als nächstes habe ich die Einstellungen im Setup des Templates geändert.
Von
# URL Rewritting
########################################
config.simulateStaticDocuments = 1
config.simulateStaticDocuments_noTypeIfNoTitle = 1
config.simulateStaticDocuments_addTitle = 30
config.absRefPrefix = http://www.odoo.tv/
in
# RealURL Setup
########################################
config.simulateStaticDocuments = 0
config.tx_realurl_enable = 1
config.baseURL = http://www.odoo.tv/
config.defaultToHTMLsuffixOnPrev = 1
config.uniqueLinkVars = 1
config.linkVars = L
Problem Nummer 1
Zu guter Letzt wollte ich noch "respectSimulateStaticURLs" in die Konfigdatei von RealURL eintragen. Aber es war gar keine Konfigurationsdatei vorhanden. In der Erweiterung steht, daß diese automatisch angelegt wird und im Pfad /typo3conf/ zu finden ist. Da aber war nichts. Somit funktionierten natürlich alle alten Links auf dem Web nicht.
Problem Nummer 2
Damit aber noch nicht genug. Durch die Umstellung sollten ja auch die Links schöner aussehen. Aktuell sehen sie wie folgt aus:
- http://www.odoo.tv/Olight-M20-Warrior-S.718.0.html
Mit RealURL sollten sie dann am Ende so aussehen:
- http://www.odoo.tv/Technik/Taschenlampen/Olight-M20-Warrior-S.html
Das aber war nicht der Fall. Die Adressen werden völlig kryptisch umgeschrieben. So etwa sah die obige Adresse nun wie folgt aus:
- http://www.odoo.tv/718/
Das ist natürlich genau das Gegenteil von dem was ich eigentlich erreichen wollte. Ich hoffe ihr wißt, was da schief gelaufen ist und ihr könnt mir helfen. Zum Abschluss hier nochmal meine .htaccess Datei:
# PHP5 anschalten fuer 1und1
AddType x-mapp-php5 .php
AddHandler x-mapp-php5 .php
# URL Rewrite anschalten fuer RealURL
RewriteEngine On
RewriteBase /
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php
Hallo Arthur,
718 ist die uid deiner Seite. Der Link schaut nur so aus, weil dir die RealUrl-Config fehlt, und RealUrl somit nicht weiß, wie die Adresse generiert werden soll.
Schau mal im Extension Manager unter RealUrl -> Configuration:
Da gibts eine Option, die heißt "Path to configuration file", da trägst du den Pfad ein, z. B. "typo3conf/realurl_conf.php".
Anschließend erstellst du diese Datei "realurl_conf.php" im Ordner "typo3conf" und kopierst eine Beispiel-Konfiguration hinein, wie du sie z. B auf dieser Seite finden kannst: http://www.oliver-thiele.de/cms-typo3/tutorials/realurl-tutorial.html
Danach Cache löschen und es sollte funktionieren.
RealUrl erstellt die Konfiguration nur automatisch, wenn du im EM unter der RealUrl-Configuration den Punkt "Enable automatic configuration" auswählst. Aber ich würde es eher manuell machen.
Oder was dir auch helfen könnte, wäre die Extension aeurltool, mit welcher du auch die RealUrl-Config zusammenbasteln kannst...
Grüße Patrick
Anbei die ht.access die mein Typo3 mit ausgeliefert hat.
Bei mir funktioniert sie mit Typo3 4.3.11 und aktuellst möglichem RealURL.
Sie erzeugt folgende Links http://www.domain/meineSeite/
Meine BaseURL sieht anders aus als deine:
# Statische Seiten ermöglichen
config.simulateStaticDocuments = 0
config.baseURL = http://www.domain.de/
config.tx_realurl_enable = 1
#nötig wenn baseURL gesetzt
config.prefixLocalAnchors = all
#####
#
# Example .htaccess file
#
# This file contains a collection of almost everything you will need
# for optimising TYPO3:
#
# - mod_rewrite (used for SimulateStaticDocuments, RealUrl, etc.)
# - PHP optimisation
#
# If you want to use it, you'll need to rename this file to '.htaccess'.
# (To make this work you will need to adjust the 'AllowOverride'
# directive in your Apache configuration file.)
#
# IMPORTANT: You may need to change this file depending on your TYPO3
# installation!
#
# You should change every occurance of TYPO3root/ to the location where you
# have your website in. For example:
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove 'TYPO3root/')
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
#
# If you have problems with this file, try using the minimal
# mod_rewrite.htaccess which is located in the typo3_src/misc/
# directory of this installation.
#
# You can also use this configuration in your httpd.conf, but you'll have
# to modify some lines, see the comments (search for 'httpd.conf')
#
# Using rewriting in your httpd.conf is much faster, btw.
#
# Questions about this file go to the matching Install mailing list,
# see http://typo3.org/documentation/mailing-lists/
#
####
##
# Compressed .js and .css files
##
# uncomment the following lines if you use compression
#
#<FilesMatch "\.js\.gzip$">
# AddType "text/javascript" .gzip
#</FilesMatch>
#<FilesMatch "\.css\.gzip$">
# AddType "text/css" .gzip
#</FilesMatch>
#AddEncoding gzip .gzip
### Begin: Rewrite stuff ###
# Enable URL rewriting
RewriteEngine On
# To assist in debugging rewriting, you could use these lines
# DON'T enable it for production!
# This will only work in httpd.conf, not in .htaccess files
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9
# If you use the RealUrl extension, then you'll have to enable the next line.
# You will have to change this path if your TYPO3 installation is located
# in a subdirectory of the website root.
#
# If you place this in httpd.conf, you cannot use this directive in any case!
#RewriteBase /
# Rule for versioned static files (see $TYPO3_CONF_VARS[BE][versionNumberInFilename])
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|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
RewriteRule ^(typo3|t3lib|tslib|fileadmin|typo3conf|typo3temp|uploads|showpic\.php|favicon\.ico)/ - [L]
# Redirect http://mysite/typo3 to http://mysite/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
# Important note: If you copy/paste this into httpd.conf instead
# of .htaccess you will need to add '%{DOCUMENT_ROOT}' left to each
# '%{REQUEST_FILENAME}' part.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# Main URL rewriting.
# If you use Windows and SimulateStaticDocuments do not work, try adding a
# slash (/) right before 'index.php' below.
# The example shows how to rewrite only *.html and *.pdf files to index.php
# This may be helpful when using an extension that can generate PDF files
# on the fly.
# Example: RewriteRule .*\.(html|pdf)$ index.php [L]
# For httpd.conf, use this line instead of the next one that has no '#':
# RewriteRule .* /TYPO3root/index.php [L]
# For use with the RealUrl extension, you might need to remove the
# RewriteBase directive somewhere above and use this line instead of the
# next one:
# RewriteRule .* /index.php [L]
RewriteRule .* index.php [L]
### End: Rewrite stuff ###
### Begin: PHP optimisation ###
# All features below are left to the default if you don't change this.
# Simply remove the comment marks if you want to use some/all of these
# settings
# The PHP developers recommend disabling this feature. Do that.
# It's deprecated and is likely to be unsupported in future versions of PHP.
#php_flag allow_call_time_pass_reference off
# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
#php_flag register_globals off
# PHP may not declare the argv & argc variables (that would contain the GET
# information).
# TYPO3 doesn't need this, so just turn it off.
#php_flag register_argc_argv off
# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
#php_flag magic_quotes_gpc off
# Order in which PHP registers GET, POST, Cookie and Built-in variables
#php_value variables_order GPCS
### End: PHP optimisation ###
### Begin: Miscellaneous ###
# Make sure that directory listings are disabled
#Options -Indexes
# There is a problem with Internet Explorer and mod_gzip on Apache servers.
# For more information, see
# http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
#mod_gzip_item_exclude file \.css$
#mod_gzip_item_exclude file \.png$
#mod_gzip_item_exclude file \.gif$
#mod_gzip_item_exclude file \.jpg$
#mod_gzip_item_exclude file \.jpeg$
#mod_gzip_item_exclude file \.js$
### End: Miscellaneous ###
# Add your own rules here
# ...
Hallo Makirolle,
makirolle schrieb
Anbei die ht.access die mein Typo3 mit ausgeliefert hat.
Bei mir funktioniert sie mit Typo3 4.3.11 und aktuellst möglichem RealURL.
Sie erzeugt folgende Links http://www.domain/meineSeite/
An der .htaccess liegt es IMO definitiv nicht, da sind die Standard-Inhalte drin, die von RealUrl benötigt werden und auch in der Beispieldatei unter "/typo3conf/ext/realurl/_.htaccess" vorhanden sind...
Grüße Patrick
Danke schon mal für den Input. Wie ich oben schrieb, habe ich RealURL ja auf automatische Konfiguration gestellt. Auch eine Datei ist angegeben (standardmäßig eine RealURL Konfig Datei in /typo3conf/). Nur legt er diese Datei nicht an. Rechte für das "/typo3conf/" Verzeichnis sind auf 755 und Typo3 schreibst selbst ohne Probleme dort rein.
Die Frage ist nur: Warum legt RealURL die Datei nicht an? Den normalen Cache habe ich geleert. Den RealURL Cache allerdings nicht (aber das sollte ein Erstellen der Konfigdatei ja nicht verhindern). Gut, ich könnte die per hand anlegen, aber das wäre eine enorme Arbeit, da die Installtion mehrere Domains beinhaltet.
@king.darki
Du hast Recht. Dein Beitrag hat auch meine Sicht erweitert. Gruß aus Berlin
config.baseURL = http://www.domain.de/
Irgendwie verhunzt das Forum die Links, richtig?
Jetzt fällts mir ein:
die kryptische Benennung hatte ich auch mal. Da musste ich die entsprechenden Felder der Seitenbenennung nacharbeiten, danach ging's.