[Typo3-dev] RealURL / Rewrite / httpd.conf

Martin Poelstra martin at beryllium.net
Wed Feb 2 17:23:39 CET 2005


Hi Wolfgang,

Please read the comments in the .htaccess I included below (it's from my 
version of RealURL, but it should work equally well with Kasper's version).

Grtz,
Martin

### Begin: Rewrite stuff ###

#######
# IMPORTANT: You have to change this file to fit your
# installation of TYPO3:
#
# You should change every occurance of TYPO3root/ to the
# location you have your website in. For example:
#
# If you have your website located at http://mysite.com/
# then your TYPO3root/ is just empty (remove every occurance
# of 'TYPO3root/').
#
# If you have your website located at http://mysite.com/some/path/
# then your TYPO3root/ is some/path/ (search and replace)
#
# Then, copy this file to the root of your website and rename
# it to: .htaccess
# You can remove all comments if you want to (for speed).
#
# You can also use this configuration in your httpd.conf,
# but you'll have to use a somewhat different form for some lines,
# see the comments.
# Using rewriting in your httpd.conf is much faster btw.
#######

# 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 a .htaccess-file
#RewriteLog /var/log/apache/rewrite.log
#RewriteLogLevel 9

# Stop rewrite processing if the URL starts with one of the 'special'
# TYPO3-paths
# For httpd.conf, use:
# RewriteRule 
^/TYPO3root/(typo3temp|typo3|typo3conf|t3lib|tslib|fileadmin)/ - [L]
RewriteRule ^(typo3temp|typo3|typo3conf|t3lib|tslib|fileadmin|uploads)/ - 
[L]

# Redirect http://mysite.com/typo3 to http://mysite.com/typo3/
# and stop the rewrite processing
# For httpd.conf, use:
# RewriteRule ^/TYPO3root/typo3$ /TYPO3root/typo3/ [L]
RewriteRule ^typo3$ typo3/ [L]

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

# Main URL rewriting
# This stays the same for httpd.conf
RewriteRule .* /TYPO3root/index.php

### End: Rewrite stuff ### 





More information about the TYPO3-dev mailing list