Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: htaccess for maintenance
joel wrote:
How can I get clean url’s working and still keep my index.html for those who doesn’t know about my other sections?
Hi Joel,
Just add this line in the ‘normal’ textpattern .htacces file:
RewriteRule ^$ index.html [L]
It has to be put right under the RewriteEngine On
line
You can then access your new txp site with sitename.com/index.php and all normal traffic (to sitename.com) gets the static index.html page.
This is very handy because with adding one # you can open the new site
#RewriteRule ^$ index.html [L]
This is the first thing I do when I am working on a (new) txp site and want a simple ‘working on it, come back later’ note.
kees
Offline
#14 2007-03-05 10:58:38
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: htaccess for maintenance
You mean like this:
RewriteEngine On
RewriteRule ^$ index.html [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
By using this I get directly to the index.php. When commenting out the last line I get an error on opening index.html
Please… help me back on track here :)
Last edited by joel (2007-03-05 11:06:14)
Offline
Re: htaccess for maintenance
joel wrote:
You mean like this:
RewriteEngine On
RewriteRule ^$ index.html [L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) - [PT,L]
RewriteRule ^(.*) index.php
yes this allways works for me
is your site in a subfolder or in the domain root?
-k
Last edited by kees-b (2007-03-05 19:20:26)
Offline
#16 2007-03-05 21:02:54
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: htaccess for maintenance
It’s in here:
/hsphere/local/home/user/domain.com/
I guess this is the root. Not a subdomain anyway.
Offline
#17 2007-03-05 22:14:55
- joel
- Member
- Registered: 2004-11-26
- Posts: 162
Re: htaccess for maintenance
Got it working now…
It was probably a typo or something…. :)
Offline