Introduction

The WixRouterRequest object breaks the URL of the incoming router request into different parameters for easy access.

The URL is broken into:

Premium Sites

For premium sites, the URL of the site router request has the following format: https://www.domain.com/myPrefix/myPath?myQuery=myValue#myHashDesc

  • baseUrl:     https://www.domain.com
  • prefix:        myPrefix
  • path:          myPath
  • query:        myQuery=myValue
  • hash:        #myHashDesc

Example: https://domain.com/mammals/elephant?species=african-elephant#LifeSpan

  • baseUrl:     https://domain.com/
  • prefix:        mammals
  • path:          elephant
  • query:        species=african-elephant
  • hash:        #LifeSpan

Free Sites

For free sites, the URL of the site router request has the following format: https://user.wixsite.com/mySite/myPrefix/myPath?myQuery=myValue#myHashDesc

  • baseUrl:     https://user.wixsite.com/mySite
  • prefix:        myPrefix
  • path:          myPath
  • query:        myQuery=myValue
  • hash:        #myHashDesc

Example: https://user.wixsite.com/zoo/mammals/elephant?species=african-elephant#LifeSpan

  • baseUrl:     https://user.wixsite.com/zoo
  • prefix:        mammals
  • path:          elephant
  • query:        species=african-elephant
  • hash:        #LifeSpan

Note: The above URLs are for a published site. When previewing your site, you will receive the Editor URL.

Was this helpful?
Yes
No