first of all thank you to take a little time to read my question.
I have a webpage that I need to redirect everyone who joins on it(and loads the index.php file) to the same file with parameter.
For example, If i have www.url.com
, I want to create a rule in .htaccess
that automatically redirected to www.url.com/en/
. Can anyone help me?
Thank you.
Did you try
RewriteEngine on
RewriteBase /
RewriteRule ^$ /en [R=301,L]
It checks if requested path is /
, if so then it redirects to /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.