I have a one page website and would like to receive the following:
www.mysite.com/index.php?p=#this-is-a-great-product
id like to have this url
www.mysite.com/this-is-a-great-product
while working correctly.
As for 1.), I use the following ive code, which works fine:
<script type="text/javascript"> var times = 0; function doclick() { times++; } function doclick() { times++; location.hash = times; } window.onhashchange = function() { if (location.hash.length > 0) { times = parseInt(location.hash.replace('#',''),10); } else { times = 0; } } </script>
... but of course it just changes any bindings to / # 1, then / # 2, etc. ro makes the dashboard work. But since I am not a programmer, I do not know how to change it ... :(
As for 2.), I can add the following to htaccess:
>RewriteEngine On >RewriteRule ^([^/.]+)/?$ /index.php?page=$1
and that changes /index.php?p=products to / products.
So, how can I change the above code (below 1.) so that it does not change all the bindings to # 1, # 2, etc., but instead links / uses URLs that I reached under 2, for example
www.mysite.com/this-is-a-great-product
And (maybe a very stupid question, but very important) - I use only new links on my site - is there a danger that this can lead to duplication of content anyway?
Regarding this, should I (for this reason or any other) sefreferential use my single index.php page for myself using rel canonical link = index.php?
Thank you very much in advance!