Home » Htaccess Tools » Htaccess Questions  » Help with .htaccess
Help with .htaccess [message #1856] Thu, 27 May 2010 13:45 Go to next message
Buzz  is currently offline Buzz
Messages: 1
Registered: May 2010
Hi,

I am a newcomer on programming .htaccess, I am now trying to redirect: http://www.website.nl/index.html to http://www.website.nl

My current .htaccess file is:
RewriteEngine on
RewriteRule ^(.*)/(.*)\.html$ index.php?param1=$1&param2=$2 [NC]

RewriteCond %{HTTP_HOST} ^website.nl$
RewriteRule ^/?$ "http\:\/\/www\.website\.nl" [R=301,L]

RewriteCond %{HTTP_HOST} ^website.nl$
RewriteRule ^index\.html$ "http\:\/\/www\.website\.nl" [R=301,L]

if I add this to the code:
RewriteCond %{HTTP_HOST} ^www.website.nl$
RewriteRule ^index\.html$ "http\:\/\/www\.website\.nl" [R=301,L]

I get an error message on my website saying that it het's stuck in a loop. What I am doing wrong?

Many thanks for your help!


Re: Help with .htaccess [message #1916 is a reply to message #1856] Thu, 08 July 2010 22:19 Go to previous message
HungryMind  is currently offline HungryMind
Messages: 14
Registered: July 2010
Hi!

First Set Your Default Page To This Code:

DirectoryIndex index.html

Then Use This Code To Redirect .html to .php

RewriteRule ^index\.html$ /index.php

Hope It'll Work..

Thnks & Regards: Hungry Mind

http://hungrymind.tk/
Previous Topic:Return 404's for domain no longer in use
Next Topic:Redirecting folder contents to index.php
Goto Forum:
  


Current Time: Thu Sep 9 15:14:32 CEST 2010

Powered by: FUDforum 3.0.0.
Copyright ©2001-2009 FUDforum Bulletin Board Software