Do you have access to the .htaccess file in your home directory? If so, you can make an automatic rewrite rule by writing the following
Options +FollowSymLinks RewriteEngine on RewriteRule /(.*)/contact-us/ /Pages/Contact.aspx?language=$1 RewriteRule /contact-us/ /Pages/Contact.aspx?language=en
Let me explain:
After the RewriteRule , the convenient URL on the left is /(.*)/contact-us/ , where (.*) Is where jp . Then jp is /Pages/Contact.aspx?language=$1 to the real URL on the right, here /Pages/Contact.aspx?language=$1 to replace $1 .
Input URL: http://www.example.com/jp/contact-us
Exit URL: http://www.example.com/Pages/Contact.aspx?language=jp
For the second RewriteRule , since the URL http://www.example.com/contact-us/ does not match the first model, it will automatically turn into http://www.example.com/Pages/Contact.aspx?language=en .
Remember that the .htaccess file MUST be in the root directory (next to the Pages folder). Otherwise, you will not get the desired result.
source share