: 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
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.
More posts by @Murray155
1 Comments
Sorted by latest first Latest Oldest Best
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
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.