I have a subdirectory called /al on my website, which I wish to redirect to the main page, with a language setting.
So I have the following rule:
Redirect permanent /al /?lang=en
But after verification with cURL, I am getting sent to /?lang=en/
instead. How can I remove the trailing slash?
将RedirectMatch
用于正则表达式功能:
RedirectMatch 301 ^/al/?$ /?lang=en
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.