I searched http://www.google.com/search?source...S177&q=htaccess+redirect+to+a+specific+folder but I still could not get this to work. I need a redirect to a certain folder when people visit the root directory of my site. I tried: DirectoryIndex /php Code (markup): but it does not do anything.
Here is what I wound up with RedirectMatch permanent ^/$ http://mydomain.com/php/index.php Code (markup): Guess that works. I will leave the thread up in case someone needs the info one day (unless a mod wants to delete it )
gawd.. i have been searching this for such a long time. Thanks a million. I have been trying those rewrite codes. Thanks again. i appreciate it!
Oh my GOD! Thank you so much for this. My 301 redirects were not working at all and this is the only thing that did the trick. After two longs nights of fruitless searches I found your response, which saved me in a bind. For others who may happen upon this thread-- I have a wordpress site with a custom template that I (poorly) built. The wordpress index / front page / root would *not* forward to a specific page I determined, I believe because I was using custom URL permalinks with /%postname%/ No redirection plugins or htaccess changes were making any difference, and every once in a while I'd get an infinite redirect loop or a 500 internal server error. ANYWAYS, thanks so much. Below is my .htaccess code if anyone is interested... # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] RedirectMatch permanent ^/$ http://mysite.com/pagename </IfModule> # END WordPress Code (markup):