Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-03 02:26:04

scdoody
Member
Registered: 2006-10-18
Posts: 129

Index.html versus index.php

I am redesigning and want it so that when people type in www.mydomain.com they go to www.mydomain.com/index.html (which I have as a placeholder graphic) rather than www.mydomain.com/index.php which is my site driven my text pattern.

I’ve done this before, I just can’t remember how I did it.

Offline

#2 2008-07-03 02:32:03

hcgtv
Plugin Author
From: Key Largo, Florida
Registered: 2005-11-29
Posts: 2,722
Website

Re: Index.html versus index.php

Ooh, ooh, I know that, thanks to Alicson:

DirectoryIndex index.php index.html

#Options +FollowSymLinks
#Options -Indexes

<IfModule mod_rewrite.c>
	RewriteEngine On
	#RewriteBase /relative/web/path/
	RewriteRule ^$ index.html [L]
	RewriteCond %{REQUEST_FILENAME} -f [OR]
	RewriteCond %{REQUEST_FILENAME} -d
	RewriteRule ^(.+) - [PT,L]

	RewriteRule ^(.*) index.php

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

#php_value register_globals 0

The above is a modified .htaccess file, RewriteRule ^$ index.html [L] is the trick.

Offline

#3 2008-07-03 07:10:11

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: Index.html versus index.php

…or you could probably use this

Offline

Board footer

Powered by FluxBB