Can anyone help me with a simple mod rewrite? I've already given the server some, er, issues, with my attempts to do this. Dunno what's going wrong, exactly. I want to redirect anyone who lands on the domain, e.g. domain.com, to a sub folder called wiki. That's it. If you land on the domain, www.example.com, I want to send you to www.example.com/wiki/index.php
I think it's not about mod_rewrite but redirect only Put the following code into your .htaccess file which is located in root. Redirect / /wiki/index.php Code (markup): Hope it helps! -Richie
Thanks Richie but I have tried that already and it just gives the server kittens, producing an Internal Server Error. I've also tried using Redirect index.html http://www.mydomain/wiki/index.php Code (markup): simply doesn't work for some reason. It may be that my host is limiting some .htaccess commands, I'm not sure. I do know that I can apply a mod rewrite - I just don't know how.
If you could use php or asp then change your index.html to index.php and you could do redirect manually using
That's a bit odd,try Redirect [COLOR=Red]/[/COLOR]index.html http://www.mydomain/wiki/index.php Code (markup): Yea,with a slash. It works good in my personal blog!I don't think your host would limit this kind of things P.s:I'd like to know your site if you don't mind
Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^$ http://www.domain.com/wiki/ [R=301,L] might do it.
I have much better luck with mod_rewrite than that redirect stuff!!! Notice I don't even mention 'redirect' in the mod_rewrite faq!!!!
In the Mod Rewrite board of this forum... Here's a direct link: http://forums.digitalpoint.com/showthread.php?t=23044