[BNM] .htaccess
David Pashley
david at davidpashley.com
Thu Mar 19 07:53:56 GMT 2009
On Mar 18, 2009 at 15:02, Phil Guilfoyle praised the llamas by saying:
> Hi,
>
> We are using WordPress and want to add a rewrite rule to the .htaccess
> file to push the http://www.domain.co.uk/index.php to the
> http://www.domain.co.uk.
>
> This isn't working:
>
> RewriteRule ^www\.domain\.co\.uk/index.php$ http://www.domain.co.uk/$1
> [R=301,NC]
>
> Can anyone shed any light?
>
>
Just so I understand this, you want the user to visit
http://www.domain.co.uk/ and get the home page? If so, you want
DirectoryIndex index.php
If however, you don't want the user to ever see
http://www.domain.co.uk/index.php, even if they type it in, then you
want:
Redirect permanent /index.php http://www.domain.co.uk/
There really are very few times that you want or need the power of
mod_rewrite.
--
David Pashley
david at davidpashley.com
Nihil curo de ista tua stulta superstitione.
More information about the BNMlist
mailing list. Powered by Wessex Networks