my problem with .htaccess !

Discussion in 'Apache' started by alex2011, Jan 21, 2011.

  1. #1
    Hello,
    i want redirect my forum folder to root but have problem .

    i want redirect http://www.mydomain.com/forum to http://www.mydomain.com


    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^forum(.*)$ http://www.mydomain.com$1 [L,R=301]
    </IfModule>

    i upload this code to my .htaccess ( root folder ) all working but big problem !
    when i go to http://www.mydomain.com/forum/forum1343.html firefox show me error " Firefox can't find the server at www.mydomain.com1343.html. " !!

    but similar this link (http://www.mydomain.com/forum/thread2342.html ) redirect to (http://www.mydomain.com/thread2342.html ) so working fine . mean i want also redirect http://www.mydomain.com/forum/forum1343.html to http://www.mydomain.com/forum1343.html )


    please Help me..!
     
    alex2011, Jan 21, 2011 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Try
    RewriteRule ^forum/(.*)$ http://www.mydomain.com$1 [L,R=301]
     
    mwasif, Jan 22, 2011 IP
  3. smear

    smear Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    find out the help on web or the apache tutorial where I had notice it.
     
    smear, Jan 24, 2011 IP
  4. alex2011

    alex2011 Active Member

    Messages:
    106
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #4
    working BUT with this RewriteRule :

    RewriteRule ^forum/(.*)$ http://www.mydomain.com/$1 [L,R=301]

    thanks
     
    alex2011, Jan 24, 2011 IP
  5. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #5
    Ohhh, I missed that.
     
    mwasif, Jan 24, 2011 IP