Click to See Complete Forum and Search --> : .htaccess problem.


FuzzyLogik
08-07-2007, 02:27 AM
I am trying to get mysite.com/ to mysite.com/index.php, but look like mysite.com.

Right now, I have a blog on /blog/ but when I go to /blog/ it gives me a 404 error, I have to actually go to /blog/index.php

I googled for a solution, but I can't find one :-/

knowj
08-07-2007, 02:57 AM
i'm guessing your trying to use url rewrite?

you shouldn't rewrite to the same name as a directory e.g.
/blog/index.php
RewriteRule ^blog/$ /blog/index.php

also make sure the .php extension is included in the DirectoryIndex
Add this to the top of your .htaccess if your unsure
DirectoryIndex index.htm index.html Index.htm Index.html index.php

FuzzyLogik
08-07-2007, 07:59 AM
thank you very much, that works for mysite.com/blog/
but I have the following also that is making "mysite.com/blog" (no trailing slash) break:

RewriteRule ^([^\.\?]+)(\?.*)?$ $1.php