HTML redirect question..........

by 3 replies
4
I have an HTML site and one of the major search engines has my site indexed as:

www.mysite.org/index.htm

I would like those who click on my link on the search engine to be redirected to:

http://www.mysite.org

I already have an .htaccess file in the root that redirects the non-www to the www but I don't know what I need to add to the .htaccess file to get www.mysite.org/index.htm to redirect to http://www.mysite.org
#programming #html #question #redirect
  • Is this what you're looking for?

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.html -f
    RewriteRule ^(.*)$ $1.html
    • [1] reply
    • Thanks for information but it won't redirect properly. Right now I have this in my .htaccess file to redirect the non-www to the www which is working but I also need to redirect www.mysite.org/index.htm to to www.mysite.org

      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^mysite.org& [NC]
      RewriteRule ^(.*)$ http://www.mysite.org/$1 [R=301,L]
      • [1] reply

Next Topics on Trending Feed