Search code examples
phpurlmasking

Domain/URL Masking


I have a website that passes some GET variables to different pages in PHP. My issue is that now I have a url with variables i.e. index.php?category=categoryname and that's not very memorable.

Is there any way I can change the URL to something like /categoryname instead without duplicating the page and storing in folders? But also allow users to type in /categoryname and be redirected to the correct page?


Solution

  • .htaccess Apache mod_rewrite, almost every professional dynamic website uses this method (like stackoverflow).

    The method is fully explained in this article far better then I could ever explain it in this answer box.