Page 1 of 1

htaccess and mod_rewrite

Posted: Thu Nov 01, 2007 12:15 am
by Scuzzmonkey69
hi.

trying to put a sub-directory into my s9y install, have followed all the guides in the FAQ and every post in the forum, yet this refuses to work.

I have a .htaccess file in the directory containing

# BEGIN s9y
RewriteEngine Off
# END s9y

yet it still takes me back to the main page.

www.scuzzmonkey.com/

instead of to the forum index

www.scuzzmonkey.com/forum/

any ideas?

Posted: Thu Nov 01, 2007 8:45 am
by carl_galloway
I fond the same thing on one of my blogs, I was installing webalizer, and what I found is going to the directory took me back to serendipity, but going directly to the webalizer index.html did work, try typing the full URL of the file you want to open into your address bar instead of typing in the folder eg

forum/index.php
instead of
forum/

I think, although I could be wrong, that getting both addresses to work also means you need to edit the main .htaccess.

Posted: Thu Nov 01, 2007 1:18 pm
by Scuzzmonkey69
yea that works, thanks :)

edited the .htaccess, and out a 301 redirect rule in to forum/index.php and it still goes back to the site, lol.

Posted: Fri Nov 02, 2007 11:33 am
by garvinhicking
Hi!

This is because of the "DirectoryIndex /index.php" command.

Insert

Code: Select all

DirectoryIndex yourindexfileforthesubdirectory
in your .htaccess file of the external directories as well. For your forum, that would be:

Code: Select all

Rewriteengine Off
DirectoryIndex index.php
HTH,
Garvin