Mobile app version of vmapp.org
Login or Join
Murray155

: PHP - URL variables that look like pages `/POSTID/` I'm new to websites with databases and was wondering how to make a url look like https://domain.tld/H34d2b rather than https://domain.tld/?p=H34d2b

@Murray155

Posted in: #Php #Url

I'm new to websites with databases and was wondering how to make a url look like
domain.tld/H34d2b rather than domain.tld/?p=H34d2b
I had an idea of forwarding the page to a 404 PHP script, so /H34d2b doesn't exist but the 404.php could read the url and display the content; but this seems a bit messy and would like to check if there is a better way other than what I am about to do.

I tried searching for this but I don't know how else to search for this other than url variables and I keep getting ?v= - which is not a format I'd like.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Murray155

1 Comments

Sorted by latest first Latest Oldest Best

 

@Radia820

If you're using Apache or a compatible web server you need to use:
mod_rewrite - httpd.apache.org/docs/current/mod/mod_rewrite.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme