Using kontextURLs for Dynamic Content Redirection

kontextURLs are powerful smartURLs, which can facilitate Dynamic Content Redirection via an .htaccess file included on your Web server. Redirects enable you to direct website visitors to specific content based on criteria you define related to the URLs/Content they are engaging with. For example, you may wish to direct all those who engage a piece of content on Twitter to one piece of content and those who engage with a piece of content on Facebook to another. These redirects can be based on the following: kontextURLs, tags and/or dynamic aliases.

Redirects can be simply configured via the following steps:

  1. Login to gShift and navigate to kontextURLs.
  2. Create a Tag.
  3. Use HTML page names as Tag Values/Aliases. e.g. index.html, page1.html, page2.html
  4. When creating your kontextURL, configure Tag Forwarding to send the tag to the selected website.
  5. Add the following code to your website's .htaccess file:
RewriteEngine on
RewriteCond %{QUERY_STRING} ^PAGE=(.+)$
RewriteRule ^(.*)$ http://%{HTTP_HOST}/%1?
(The Tag Alias=PAGE)
The rewrite rule above takes the value which is in the "Page" attribute and will change the destination page accordingly. 


Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk