All posts by Ammar Almasri

Define success on your own terms, achieve it by your own rules, and build a life you’re proud to live.

Redirect & re-write rules with web.config

Redirect & re-write rules with web.config

Step-by-step tutorial. How to set web.config rules [Redirect & re-write]

  1. Redirect HTTPS to HTTP
  2. Redirect HTTP to HTTPS
  3. Redirect old domain name to new domain name
  4. Redirect old domain name to new domain name and keep the rest of URL the same when redirecting to the new domain name
  5. Redirect specific page to another specific page
  6. Redirect non-WWW to WWW
  7. Force add WWW to the domain name
  8. Force remove WWW from domain name

*  When you copy one the codes below to your web.config file make sure to past it inside re-write element { <rewrite>  [copied code]  </rewrite> }


1.Redirect HTTPS to HTTP

  • Domain name = https://mydomain.com/

*  This will redirect https to http

Example:

  1.  https://mydomain.com/  >>> http://mydomain.com/
  2.  https://mydomain.com/somepage/ >>> http://mydomain.com/

2.Redirect HTTP to HTTPS

  • Domain name = http://mydomain.com/

*  This will redirect http to https

Example:

  1.  http://mydomain.com/  >>> https://mydomain.com/
  2.  http://mydomain.com/somepage/ >>> https://mydomain.com/

3.Redirect old domain to new domain

  • Old domain = http://olddomain.com/
  • New domain = http://newdomain.com/

*  This will redirect your old domain name to your new domain name when user type the old domain name in browser.

Example:

  1.  http://olddomain.com/  >>>  http://newdomain.com/
  2.  http://olddomain.com /somepage/ >>>  http://newdomain.com/

4.Redirect old domain to new domain and keep the rest of URL when redirect to new domain

  • Old domain = http://olddomain.com/
  • New domain = http://newdomain.com/

*  This will redirect your old domain name to your new domain name when user type the old domain name in browser and it will keep the rest of URL from the old domain name and post it to the new redirected domain name.

Example:

  1.  http://olddomain.com/  >>>  https://newdomain.com/
  2.  http://olddomain.com /somepage/ >>>   https://newdomain.com/somepage/

5.Redirect specific page to another specific page

  • Page one = http://mydomain.com/pageone
  • Page two = http://mydomain.com/pagetwo

*  This will redirect [pageone] to [pagetwo] when user try to access page one

Example:

  1.  http://mydomain.com/pageone  >>>  http://mydomain.com/pagetwo
  2.  http://www.mydomain.com/pageone  >>>  http://mydomain.com/pagetwo

6.Redirect non WWW to WWW

  • Domain name = http://mydomain.com/

*  This will redirect non WWW domain name to WWW one

Example:

  1.  http://mydomain.com/  >>>  http://www.mydomain.com/
  2.  http://www.mydomain.com/  >>>  http://www.mydomain.com/

7.Force add WWW to domain name

  • Domain name = http://mydomain.com/

*  This will force add WWW to your domain name when user type it like this: http://mydomain.com/

Example:

  1.  http://mydomain.com/  >>>  http://www.mydomain.com/
  2.  http://www.mydomain.com/  >>>  http://www.mydomain.com/

8.Force remove WWW from domain name

  • Domain name = http://www.mydomain.com/

*  This will force remove WWW from your domain name when user type it like this: http://www.mydomain.com/

Example:

  1.  http://www.mydomain.com/  >>>  http://mydomain.com/
  2.  http://mydomain.com/  >>>  http://mydomain.com/

Good luck 🙂

Swedbank & PayPal

Swedbank & Paypal

Step-by-step tutorial. How to connect Swedbank account with PayPal?

If you have a bank account number of 15 digits such as in the case of Swedbank accounts and you want to link it to your PayPal account so you can make transactions and withdraw your money from PayPal to your bank account. Then you have faced a technical issue that says that you can not add this bank account to the PayPal system because it has 15 digits which is not a valid account number in the PayPal system. A valid bank account number in the PayPal system must contain only 14 digits and here is how to fix that.

The way to fix that issue is too easy. First of all, you have this format of 15 digits account number (XXXX,X-XXXXX XXXXX)

  • The first 4 numbers (XXXX) are the clearing number
  • Fifth number (X) Is the bank number
  • Last 10 numbers (XXXXX XXXXX) are your bank account number

Reference (https://en.wikipedia.org/wiki/International_Bank_Account_Number)

How to fix:

  • Go to PayPal account > money > bank > link a new bank > add
  • Choose Country and write your Bank name
  • Set account type  to Bank account
  • Write the 

And you’re done, just give it 3 – 7 days to take effect and be approved by PayPal, you don’t have to do anything else!

Briefly:

This is your bank account number format (XXXX,X-XXXXX XXXXX)
Just remover the fifth number (Xof your bank account so it will look like this (XXXX-XXXXX XXXXX) and add it to your PayPal account. It will take 3 – 7 days to confirm it so just sit back and relax 🙂