I want a rewrite rule to work in such a way that it loads the second URL but in browser address field it should show first URL.
For example domain.com/folder1/folder2
should load domain.com/folder1
but not show domain.com/folder/folder2
in browser.
I tried this but it basically changes the URL in browser.
RewriteRule ^/folder1/folder2(.*)$ /folder1/$1 [L]
Tried googling but didn't get any help. Appreciate your help!
Remove the beginning /
s from the rule:
RewriteRule ^folder1/folder2(.*)$ folder1/$1 [L]
精彩评论