Step 1
Go to IIS Manager and select the website that needs to be redirected
Select URL Rewrite
Click Add Rule, select Blank Rule, and enter a name for your rule. Fill out the following pop-up window as follows:
In the next window, edit the following:
This will take you to the Action section. Here you should make the following changes:
Click to apply!
Step 2
" VirtualHost *:80": Listen for connections on port 80 () for the luxembourg mobile database domain you specify
" VirtualHost *:443": Listen for connections on port 443 (S)
Replace "ServerName" and "ServerAlias" with your domain name
"Permanent redirect s:exampleom" can redirect traffic to the S site.
Restart your server.
Redirecting with .htaccess
If you use .htaccess for redirection, you will need the mod_rewrite module - but don't worry, this is the default on most servers.
Simply open your root .htaccess file and add the following code:
RewriteEngine OnRewriteCond %{S} offRewriteRule ^(.*)$ s:exampleom$ [L,R=301]
Let’s take a deeper look:
" RewriteEngine On": Enable rewrite
" RewriteCond %{S} off": Check connection
" RewriteRule ^(.*)$ s:exampleom$1 [L,R=301]": This redirects to S with a 301 status code. Just make sure you put your domain name where "example" is!
The benefit of using .htaccess redirects is that you don't have to restart anything for them to take effect.
Appendix: Status Codes
What are status codes?
Every time you request a web page, the server returns a 3-digit code. They tell you how the server handled the request. You won't notice them unless something goes wrong.