Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-01-07 05:09:50
- lemonhead
- Member
- Registered: 2006-08-04
- Posts: 32
htaccess file in the root and textpattern folder
I needed to make changes to my htaccess file (see below) in the root folder of my web site. I also noticed that there is an htaccess file in the textpattern folder. Do I need for the htaccess file in the textpattern folder to be the same as the htaccess file in my root folder.
Lastly please provide a link that explains what a rewritebase does ? I had to remove mine from the htaccess file so the pre-check worked. I have no idea why I needed to remove it other than another 1and1 (web hosting provider) person said to do this.
Thanks !
htaccess file contents:
————————————
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
#php_value register_globals 0
Offline
#2 2007-01-07 06:01:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: htaccess file in the root and textpattern folder
You can only have one .htaccess per folder at a time, so you would combine the rules of both into one file. You only need the rules in the one that comes with Textpattern if you want to have clean urls; if that doesn’t matter to you, you can simply delete it.
If it does matter: if you would post the contents of your original .htaccess file, we can show you the proper way to combine them (sometimes it matters, sometimes it doesn’t).
Your post sounds a little muddled, so I want to clarify: Textpattern only comes with one .htaccess file, it should be in the same folder as:
- index.php
- HISTORY.txt
- README.txt
- files (folder)
- images (folder)
- textpattern (folder)
and by default it should contain:
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#RewriteBase /relative/web/path/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
</IfModule>
#php_value register_globals 0
Offline