I have urls structured like this http://domain.com/search.php?query=perks
I want to be able to match the first letter of the query "in this case perks" and make a url like this
http://domain.com/p/perks
I would also like it so that if the query starts with a number EX query "1 perk" that it will make a url like this.
domain.com/1/1+perk
Does anyone know how to achieve the matching of the first character of the search to make urls structured like this? Thanks
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
As the mod_rewrite documentation explains,
Therefore, the solution is:
By the way, the |
|||
|
|