The proper solution is to include both the ID and the name. Otherwise name changes will break all links stored by search engines, users, etc.
You wouldn't. You'd set it up to rewrite from:
If you wanted to use the category names, you'd need to change the php on the back end to accept them.
Use htaccess with a rewrite rule:
RewriteEngine on RewriteRule ^([^/\.]+)/?$ /cat.php?id=$1 [NC,L]
example.com/category would be re-written to
People are also looking for solutions to the problem: php - Update MySQL database from XML file
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
Find the answer in similar questions on our website.
- 369 php - PHPUnit uncategorized option --run
- 941 wordpress - Access Plugin data from Functions.php
- 242 php - Change sidebar navigation based on current post
- 897 function - PHP Implode - variable between text
- 380 php - Determine if the store is open?
- 894 PHP: How to echo remaining time in minutes from microtime
- 590 php - Formatting in a json decoding
- 182 php mail from crm to gmail account
- 12 php - Language Allowing Rapid Development And Refactoring To Best Practices
- 836 php - How exactly do i go about implementing a facebook-esque news feed
- 941 email - Mail function is not working in PHP
- 416 php - Coverting cURL to java for parse.com?
- 729 php - Convert a string to a multidimensional array
- 554 php - Nextcloud sync large files