[thelist] testing .htaccess

Mark Gillingham markgill at uwalumni.com
Fri Oct 8 07:10:16 CDT 2004


Thanks for your ideas. I've made some progress. I've convinced myself 
that the htaccess file is being read and that some rewriting is 
occurring. Now I can turn to debugging the rewrite statements. It 
appears that the rule is being applied one level lower than the 
directory I'm interested in. I'm close.

For those who asked, the htaccess statements follows. One interesting 
thing, if I uncomment the line that begins "# RewriteLog," I get an 
Apache error. I'm still investigating that.

### 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

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

RewriteRule .* index.php [L]

### End: Rewrite stuff ###




More information about the thelist mailing list