Please help me in achieving following. How can I redirect /directory1/* to /directory2/* Example /directory1/a.html should be redirected to /directory2/a.html and /directory1/b.html should be redirected to /directory2/b.html Q2. How can i redirect the directory root to the index.html Example /directory1/ should be redirected to /directory1/index.html Thanks
Q1: /directory1/.htaccess RewriteEngine on RewriteRule ^(.*)$ /directory2/$1 [R, L] Code (markup): Q2: /directory1/.htaccess RewriteEngine on RewriteRule ^/$ index.html [R, L] Code (markup):
I am somewhat new at this. Where do you put the code? Oh, sorry, I should have looked closer. It's in the .htaccess file.
Thanks thuankkk for replying... But I cant use the rule you suggested. Because directory1 and directory 2 are not physical directory present in file system, it is drupal aliases (rewritten path). so i cant put the suggested rule into .htaccess file under directory1 or directory2. it has to go inside my public_html directory. in this case these rules are not valid. Sorry for confusion.