开发者

Rewrite rule without changing URL in browser

开发者 https://www.devze.com 2023-04-01 13:15 出处:网络
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.

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]
0

精彩评论

暂无评论...
验证码 换一张
取 消