One of our customers recently asked if it was possible to cloak AWtomator link events so that they appear to come from your own domain.
So, here’s a step by step tutorial on how to do it on a standard Apache server – which is the most commonly found hosting server out there. The pictures below show screens from the popular CPanel file manager, but the principles are the same regardless of how you create/upload files to your server.
Step 1: Create a folder called ‘c’
The first step is to create a folder called c in the web root of your site. The web root is the folder that holds your homepage index file or WordPress index.php, and usually also holds a cgi-bin folder.
For CPanel hosts – and in the majority of other cases – the web root folder is generally called public_html (with a second ‘alias’ or shortcut to it called ‘www‘), but it may also be called htdocs, httpdocs, html, public, or web, depending on your host.
Using the CPanel File Manager, all you have to do is browse to the web root folder, then hit the “New Folder” button and name the folder ‘c‘.
Step 2: Create a .htaccess file
The next step is to browse into your newly created ‘c’ folder and create a new file in it called .htaccess
In the CPanel File Manager, all you have to do is click into your new ‘c’ folder, then hit the “New File” button and name your new file .htaccess
NB: Note that the file starts with a period (.) which indicates it is going to be a hidden / system file.
Step 3: Populate your .htaccess file
Open the new file, paste in the following code and save:
[code]&lt;IfModule mod_rewrite.c&gt; RewriteEngine On RewriteBase /c/ RewriteRule ^(.*)$ https://www.awtomator.com/c/$1 [L,QSA] &lt;/IfModule&gt;[/code]
What this does is to take any data sent in your customised link and forwards it to AWtomator.
Using Your New Cloaker
Now you’ve set up the redirection, it’s time to test it out. So simply grab one of your link events and replace the automator address part with your domain.
For example, if you had this Link Event code:
You should now be able to cloak it to:
Test it out, and if you find it redirects ok, you are all set!
- If it works for one link event, you’ll know it will work for them all
- If you get a 404 Not Found error, check you put the ‘c’ folder in the right place
- If you find nothing happens, ask your hosting support to check mod_rewrite is enabled