php - Rewriting url having more than one url parameter -


The way to rewrite URLs using the .htaccess file has been researched. After more time investment, I still have a very vague idea of ​​how the URL will be rewritten.

Actually, I have a URL:

  http://mehthesheep.com / Bali / Zimbaburn / BluePoint / 1   

I would like to rewrite it:

  http://mehthesheep.com/countries/hotel php? hotel_id = 1 & amp; State = Bali and City = Merger   

How do I know about having more than one parameter in the URL?

A few simple explanations will be appreciated!

Put this code in your DOCUMENT_ROOT / .htaccess file:

  Rewrite code% {REQUEST_FILENAME} on rewriting! -d Rewrite Convert% {REQUEST_FILENAME}! -f revised rule ^ ([^ /] +) / ([^ /] +) / ([^ /] +) / ([^ /] +) /? $ / countries /hotel.php?hotel_id=$4&state=$1&city=$2 [L, QSA]    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -