Real URL (realurl): Unterschied zwischen den Versionen
(→Tipps) |
|||
| Zeile 17: | Zeile 17: | ||
== Quickinfo == | == Quickinfo == | ||
| + | |||
* Configure Apache | * Configure Apache | ||
| − | |||
* TypoScript | * TypoScript | ||
| − | |||
| − | + | <pre> | |
| − | aeurltool or realurlsettings | + | config{ |
| − | for | + | simulateStaticDocuments = 0 |
| + | tx_realurl_enable = 1 | ||
| + | baseURL = http://www.grauff.com/ | ||
| + | } | ||
| + | </pre> | ||
| + | * First try autoconfiguration | ||
| + | * If doesen't work switch off and use manual configuration or use aeurltool (or realurlsettings) (easier to configure and contains working standard configuration) | ||
| + | * look section tipps for better configuration | ||
== Configure Apache == | == Configure Apache == | ||
Version vom 23. Juli 2008, 20:29 Uhr
Tipps
Alte Simulatic Links von außen erhalten...
RewriteRule ([0-9]+)\.([0-9]+)\.html$ http:///index.php?id=$1&type=$2 [R=301,L]
Lange Pfade abkürzen Manchmal hat man sehr lange Pfade wenn die Navigation in Unterordnern liegt. Mit der Extension aoe_realurlpath kann man diese Teile "cutten"
Probleme lösen
- Fehlermeldung Pfad/sowieso/ not found nearest match is
- Problem bei der Konfigurationsdatei (Leerzeichen vorne, falsche id etc.)
- Stylesheets, Bilder etc. aus TypoScript Konfiguration werden nicht gefunden.
- BaseURL stimmt nicht config.baseURL = http://www.meineDomain.de/
Quickinfo
- Configure Apache
- TypoScript
config{
simulateStaticDocuments = 0
tx_realurl_enable = 1
baseURL = http://www.grauff.com/
}
- First try autoconfiguration
- If doesen't work switch off and use manual configuration or use aeurltool (or realurlsettings) (easier to configure and contains working standard configuration)
- look section tipps for better configuration
Configure Apache
RealURLs work by providing 'virtual paths' to 'virtual files'. These don't actually exist on the file-system, so you must tell Apache to let a PHP-script handle the request if it can't find the file. This way, all URLs to pages (like www.server.com/products/product1/left.html) will be 'redirected' to /index.php, which will handle the translation of the URL into GET parameters. Real files (like images, the TYPO3 backend, static html-files, etc.) will still be handled by Apache itself though.
You should put the supplied sample .htaccess file (called _.htaccess) in the root of your TYPO3-installation.
Alternatively, you could include the following lines in your httpd.conf, probably in the VirtualHost-section. Here is an example:
<VirtualHost 127.0.0.1>
DocumentRoot /var/www/typo3/dev/testsite-3/
ServerName www.test1.intra
RewriteEngine On
RewriteRule ^/typo3$ - [L]
RewriteRule ^/typo3/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* /index.php
</VirtualHost>
NOTICE: USING httpd.conf is currently known not to work since t3lib_div::getIndpEnv('TYPO3_SITE_URL') is not correct. Solution remains to be found.
If you put it into a .htaccess file it has to look slightly different, basically stripping the leading slashes (“/”):
RewriteEngine On
#RewriteBase /mySubfolderIfNeeded
RewriteRule ^/typo3$ - [L]
RewriteRule ^/typo3/.*$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php
This will tell Apache that it should rewrite every URL that's not a filename, directory or symlink. It leaves everything starting with /typo3/ alone too.
Notice: For this work you need the Apache module “mod_rewrite”!
Also refer to the Appendix for extended information on mod_rewrite issues.
TS Config
config.simulateStaticDocuments = 0 config.baseURL = http://mydomain.com/ config.tx_realurl_enable = 1
localconf.php Configuration
with the variable $TYPO3_CONF_VARS['EXTCONF']['realurl']
This is managed automatically for newer realurl versions