Need help creating a URL rewrite from an SEO friendly URL

I hope you can help me. I'm trying to create a URL rewrite, redirect, or combination of the two in a .htaccess file, but I don't know how. It's kinda hard to find anything definitive on URL rewrites.

Basically, I want the user to be able to type in a SEO friendly URL (just one level) and have that sent to a page where I can do a $_GET['data'] and do a mysql query and serve up a web page. I don't want the URL the user sees to change though so I'm not sure if I need to redirect it back to the SEO friendly or if it can just stay the same SEO friendly version.

Here's my example:

The user would type in this URL: www.mysite.com/cars

somehow, that would be either redirected or rewritten as: www.mysite.com/getpage.php?page=cars

but the URL stays the same: www.mysite.com/cars

I'm pretty sure this is a URL rewrite or redirect or a combination of the two but I have no idea how to write the rewrite rules. I

Any assistance you can offer would be extremely helpful!

Thanks Keyogee



from Recent Questions - Stack Overflow https://ift.tt/2TFsOzW
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation