Shorten a link?
Let's say I have a links like this:
http://mysite.com?i=343435&f=224&am开发者_开发问答p;u=334
and this link is constant (doesn't change - let's imagine it's a posted article), I want this link to be accessible faster by shortening the link and make it like this:
http://mysite.com/myarticle
How would this be possible? I heard doing something with htaccess can make this..
This assumes the receiving page is /index.php
. Change to whatever is appropriate. The result is still transparent to the end user. That is, the address bar still says http://example.com/myarticle
.
RewriteEngine On
RewriteRule ^myarticle$ /index.php?i=343435&f=224&u=334 [L,QSA]
精彩评论