URL rewriting - LAMP


There is a PHP script for my requirement, unfortunately it is without URL rewriting implementation. So it appears something like:


My Apache installation supports mod_rewrite and I'm comfortable with LAMP development. Please provide a link so that I can implement URL rewriting for the same and it should appear as:

Category Page URL as:
or Product Page URL as:

Its an hypothetical example and I'll implement the same for its article (text) management as well.

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark GilbertSenior Performance EngineerCommented:
Something like this would work for you:

  Options +FollowSymLinks
  RewriteEngine On

  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteCond %{SCRIPT_FILENAME} !-f

  RewriteRule ^category/(\d+)*$ ./category.php?name=$1
  RewriteRule ^product/(\d+)*$ ./product.php?name=$1

Open in new window

There are plenty of examples and articles on this site e.g.  http://www.experts-exchange.com/A_4043-URL.html

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

rajoo_sharmaAuthor Commented:
Thanks guys, and apologies for not responding on time.
I'll go through it and get back to you.

I've requested that this question be deleted for the following reason:

No comment has been added to this question in more than 21 days, so it is now classified as abandoned and is now flagged for deletion.

If there is a valid solution, please OBJECT and indicate the comments that are, or would otherwise lead to, a solution.

Use the specific format https:#axxxxxxxx for comment ID(s).

Also, please don't object simply because the author did not respond to your comment. While we understand this is frustrating, unfortunately we cannot force the author to return to the question. Unless you feel you have presented a valid, verifiable solution we'll simply delete the question.

Experts-Exchange Auto Deleter
Ray PaseurCommented:
Looks like the EE_AutoDeleter cannot identify valid responses.  In particular there is a link here to an E-E Awarded Article that covers this question in detail!  Suggest the EE_AutoDeleter be shut down until it can be reworked to take into account things like this.

Please see: #a35314735 which refers to this article:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.