1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

htaccess redirect root to folder

Discussion in 'Apache' started by carl_in_florida, Nov 28, 2006.

  1. #1
    carl_in_florida, Nov 28, 2006 IP
    SEMrush
  2. carl_in_florida

    carl_in_florida Active Member

    Messages:
    1,066
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    90
    #2
    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 :) )
     
    carl_in_florida, Nov 28, 2006 IP
  3. thuonghieu

    thuonghieu Peon

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Why not use HTML redirect code:
    Save as index.htm and upload to root dir
     
    thuonghieu, Dec 3, 2006 IP
  4. unodosotres

    unodosotres Guest

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    *THANK YOU*
     
    unodosotres, Jul 31, 2008 IP
  5. junkmailbox53

    junkmailbox53 Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5

    it WORKS !!!

    YA MAN ... it's helping many .... we all need to say thank you !!!!!!
    THANKS !!!!
     
    junkmailbox53, Dec 14, 2008 IP
  6. syedtaha

    syedtaha Peon

    Messages:
    404
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    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!
     
    syedtaha, Apr 16, 2009 IP
  7. imedic

    imedic Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Many thanks too, I have looked for this allot too :)
     
    imedic, Sep 12, 2009 IP
  8. oranjeguice

    oranjeguice Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    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):
     
    oranjeguice, Jan 15, 2013 IP