How to use .html?q= as link shortener
<p>so i was wondering is there a way to make a simple javascript shortener like I manually enter the code for javascript. Like This: </p>

<pre><code>If I have a function 12345 {
window.location.href = "http://link.com";
}
</code></pre>

<p>12345 being code
and when you type</p>

<pre><code>http://example.com/index.html?q=12345
</code></pre>

<p>it redirects to the <a href="http://link.com" rel="nofollow">http://link.com</a>
no php please</p>