MOD_REWRITE - Do not Change Address bar

Discussion in 'Apache' started by Sarao, Apr 17, 2011.

  1. #1
    I have a domain, redirecting to a folder, the redirect is through mod_rewrite with the following code

    
    RewriteEngine on 
    RewriteBase / 
    RewriteCond %{HTTP_HOST} ^(www\.)?xyz\.com$ [NC] 
    RewriteRule (.*) http://www.xyz.com/index/ [R=301,L]
    
    Code (markup):
    It shows the /index/ folder on address bar when redirected, I want it to hide the /index/ in the adress bar. I know its possible, I done it in past, some 3 years ago, but now I changed the servers and I lost the .HTACCESS file and seem I am not able to do it again. Please help.
     
    Sarao, Apr 17, 2011 IP