Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-08-09 12:00:56

eworm
New Member
Registered: 2006-03-20
Posts: 6

RewriteEngine On combined with DirectoryIndex (html,php) not working

I’m trying to build a site on a server that already has an html site, so I want people to go to the index.html site until I’ve finished the textpattern site. The solution for this is ofcourse to add this to my .htaccess file:
DirectoryIndex index.html index.php

But the problem is that when I change RewriteEngine to On, the url jumps to my index.php instead of my index.html. This is my current .htaccess;

DirectoryIndex index.html index.php

Options +FollowSymLinks
Options -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine Off
	RewriteBase /

	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteCond %{REQUEST_URI} !=/favicon.ico
	RewriteRule ^(.*) index.php

	RewriteCond %{HTTP:Authorization}  !^$
	RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>

#php_value register_globals 0

Does anyone know how I can get this to work?

Last edited by ruud (2009-08-09 13:24:20)

Offline

#2 2009-08-09 13:29:03

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: RewriteEngine On combined with DirectoryIndex (html,php) not working

Try adding this before the line containing favicon:

RewriteCond %{REQUEST_URI} !=/

Offline

Board footer

Powered by FluxBB