Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-12-05 23:13:08

fowler
Member
Registered: 2007-02-12
Posts: 79

htaccess > index.html before index.php

my htaccess reads:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
DirectoryIndex index.html index.php

but for some reason, it still goes to index.php first.

am i missing something?

Offline

#2 2007-12-05 23:32:58

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: htaccess > index.html before index.php

well..shouldn’t you comment out the rewrite to index.php ?

Offline

#3 2007-12-05 23:50:05

fowler
Member
Registered: 2007-02-12
Posts: 79

Re: htaccess > index.html before index.php

well, i don’t really know much about htaccess files, apparently.

what’s the easiest way for me to do this?

Offline

#4 2007-12-06 00:34:57

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: htaccess > index.html before index.php

#RewriteRule ^(.*) index.php

Offline

#5 2007-12-06 03:58:07

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: htaccess > index.html before index.php

fowler

Maybe iblastoff and jm have solved this for you already, maybe I’m being slow, but from your first post I’m not sure what you want the rewrite rules to actually do. Now that you’ve posted your rewrite rules, could you tell us behavior you are looking for please?

For example (assuming section/title clean urls)…

  1. what are you expecting http://my.domain/index.html to get re-written to? (presumably itself)
  2. what are you expecting http://my.domain/index.php to get re-written to? (presumably itself)
  3. what are you expecting http://my.domain/mysection to get re-written to?
  4. what are you expecting http://my.domain/mysection/my-snazzy-article to get re-written to?

Thanks in advance!


Steve

Offline

#6 2007-12-06 05:00:49

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: htaccess > index.html before index.php

You’re going to have problems with clean urls by commenting out that line.

Why do you want index.html loaded instead of index.php?

Offline

Board footer

Powered by FluxBB