Redirect /index.html to /dir/index.html ONLY if visitors request www.domain.tld

Discussion in 'Apache' started by Helping, Nov 1, 2006.

  1. #1
    hello all,

    I need to redirect /index.html to /dir/index.html ONLY if the request came from www.domain.tld

    Something like this (this code don't work):

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.domain\.ltd$
    RewriteCond %{REQUEST_FILENAME} ^index\.html$
    RewriteRule ^/index\.html$ /corso/ [L]

    Someone can help me?
     
    Helping, Nov 1, 2006 IP