Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2009-02-04 17:59:49
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
404 error unless I use index.php (but works in other directories)
I am having this issue, and sure enough, when I uncomment the line in .htaccess, I get an internal server error. However, I have not had this problem with other cms/blogs that I’ve tried like Wordpress, Drupal or Joomla. Does that make sense? In other words, is DirectoryIndex a Textpattern only issue? I’m not confident that my hosting provider will make the change for me.
Offline
Re: 404 error unless I use index.php (but works in other directories)
What host are you using, and what line are you commenting out, and what url(s) is giving you an error? And if it works when you uncomment it, then what is the actual problem?
Offline
#3 2009-02-04 18:44:04
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: 404 error unless I use index.php (but works in other directories)
I use 1and1. This is the question in the FAQ I was referring to:
404 error unless I use index.php
Q.
http://example.com/index.php works, but http://example.com/ gives a ‘404 Not Found’ error
A.
Uncomment (remove the ”#” from) the following line in your .htaccess file:
#DirectoryIndex index.php index.htmlIf that doesn’t help, or causes a 500 Internal Server error, contact your web host tech support and ask them about enabling DirectoryIndex for PHP files.
Posted 3 October 2005, 05:15 by Alex Shiels
As I said, I get an internal server error.
Offline
Re: 404 error unless I use index.php (but works in other directories)
Oh I see, so even with it uncommented in the htaccess file, you still get an error. Hm. Well, I’m sure there are some folks around using 1and1…maybe do a search for that or I think there is a thread specifically for htaccess tweaks.
Yeah, here it is: http://forum.textpattern.com/viewtopic.php?id=7702
Last edited by nabrown78 (2009-02-04 19:07:21)
Offline
#5 2009-02-04 19:19:45
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: 404 error unless I use index.php (but works in other directories)
Thank you for finding that – I am going to try modifying the file.
Offline
#6 2009-02-04 19:41:18
- debegray
- Member
- Registered: 2009-02-04
- Posts: 30
Re: 404 error unless I use index.php (but works in other directories)
In case anyone else has the same problem, assuming you’re on 1and1, this .htaccess file that mrdale posted worked:
DirectoryIndex index.php index.html
Options +FollowSymLinks
RewriteBase /
<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