What are the ways to mask a long url?
say my url is http://domain.com/script.php?template.inc&action=1&page=1&ref=1
is there anyway to make it into
http://domain.com/page1
?
(all my pages aren't framed.. and I don't intend to frame them)
Thanks
It depends on what you're doing, but one would be to use sessions. You could set the variables in the query string as session variables.
Another way, although it probably doesn't apply in this case, is to use mod_rewrite to rewrite the url.
could you please explain how to use sessions? an example maybe?
thanks!
I think that maybe a sessions tutorial is a bit out of the scope of a discussion thread (although another may be willing to undertake it).
Your best bet would be to read the PHP manual section on sessions . . .
http://www.php.net/manual/en/ref.session.php
and then to look at a tutorial on this site . . .
http://www.phpbuilder.com/columns/mattias20000105.php3
What was your reason for wanting to shorten the URL? If it's only for cosmetics, sessions probably aren't the way to go.
yes, it's purely for cosmetic...