.htaccess file not working

.htaccess file not working

Posted by: Darkcinema
Posted on: 2008-10-15 14:52:00

Hi. I'm new to using the .htaccess options.
My domain is www.darkcinema.net. Currently, there's just a boring old list of links as the main page. However I have a blog (a WordPress installation) at www.darkcinema.net/darkrantings.
I'd like folks who go to www.darkcinema.net to be redirected to www.darkcinema.net/darkrantings.
I tried creating a .htaccess file and putting in:

Options -Indexes +FollowSymlinks
RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_URI} !^/darkrantings/

# Don't apply to URLs that go to existing files or folders
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all those to insert /folder
RewriteRule ^(.*)$ /darkrantings/$1 [L]

(I got this from the Dreamhost Wiki entry)
But it doesn't seem to be working.
Is there another change I should be making?
Thank you ahead of time.

Re: .htaccess file not working

Posted by: pangea33
Posted on: 2008-10-15 18:25:00

Someone smarter than me will likely come along and help you solve the problem with your .htaccess file. I understand that what you're really concerned with is redirecting people to the wordpress site on your domain though. Here is a technique you can use to accomplish that while you're waiting for a more appropriate solution.

Just make a virtually empty index.html file in your root directory that contains a javascript redirect like below...

<script type="text/javascript">
window.location = "http://www.darkcinema.net/darkrantings/"
</script>

Edited by pangea33 on 10/15/08 06:27 PM (server time).

Tags: request uridreamhostrewritefoldersindexesurlshtaccess filerewritecond