.htaccess file problem in sundirectory.. plz see this code

Discussion in 'Apache' started by davidvilson2009, Jan 7, 2011.

Thread Status:
Not open for further replies.
  1. #1
    Hi Friends,I installed a html website in my godaddy hosting and had a .htacess file in the root directory for 3 reasons:

    1) non www to www, 2) .html to .php of index page, 3) to redirect mysite.com/index.php to just mysite.com.

    Below is my code for the above 3 issues.:

    RewriteEngine On
    Redirect 301 /index.htm http://www.mysite.com/index.php


    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC]
    RewriteRule ^(.*) http://www.mysite.com/$1 [L,R=301]


    Options +FollowSymLinks
    RewriteCond %{THE_REQUEST} ^.*/index.php
    RewriteRule ^(.*)index.php$ http://www.mysite.com/$1 [R=301,L]


    The above is working fine with my main website. The problem started when I installed wordpres blog in a folder called 'myfolder' in the root firectory.

    Installation works fine but the blog gives error message : the site is not redirecting properly..

    from my above code: if I remove the lines in bold and red color, the blog works fine. but if i remove, my www, non www issues does not solve.

    some one please guide me what to do..

    Thanks in advance.
     
    davidvilson2009, Jan 7, 2011 IP
  2. davidvilson2009

    davidvilson2009 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Thanks, I solved the problems. I changes in wordpress settings from non www to www.
     
    davidvilson2009, Jan 7, 2011 IP
Thread Status:
Not open for further replies.