htaccess and mod_rewrite

Found a bug? Tell us!!
Post Reply
Scuzzmonkey69
Posts: 3
Joined: Wed Oct 24, 2007 7:02 pm

htaccess and mod_rewrite

Post 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?
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post 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.
Scuzzmonkey69
Posts: 3
Joined: Wed Oct 24, 2007 7:02 pm

Post 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.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post 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
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply