cancel
Showing results for 
Search instead for 
Did you mean: 

Use of .htaccess - silent redirection not working

Telipur
Member

Hi,

 

 I want to be able to sliently redirect my primary domain name www.mydomain.co.uk instead on pointing to /public i want to repoinrt to /public/sub_dir, but my .htaccess file continues to redirect and change the url on internet explorer to www.mydomain.co.uk/sub_dir/index.html

 

I have tested this using apache on my PC and it works (without external redirection) so don;t understand why it wont work on the server.

 

My .htaccess content is .........

Options All
RewriteEngine On
#

#dont rewrite if uri is already at sub directory level
#

RewriteRule ^sub_dir.* - [L]
RewriteRule ^sub_dir1.* - [L]
RewriteRule ^cgi-bin.* - [L]
RewriteRule ^sub_dir2.* - [L]
RewriteRule ^images.* - [L]

#

# redirect internally to sub_dir directory
#

RewriteRule ^$ sub_dir/index.html [L]

RewriteRule ^(.*)$ sub_dir/$1 [L]

 

 

This should perform server redirection with external redirection.

 

Any help would be appreciated here.

 

Shaun

 

0 REPLIES 0