.htaccess - Transform(redirect) URL segment to a GET parameter -


i know has been answered can't find specific issue.

i have urls this:

https://staging.books.co.za/travelguide/route-map/safi546754 https://staging.books.co.za/travelguide/route-map/safi189444 https://staging.books.co.za/travelguide/route-map/safi978634 

and need them redirected urls this:

https://staging.books.co.za/travelguide/route-map?reference=safi546754 https://staging.books.co.za/travelguide/route-map?reference=safi189444 https://staging.books.co.za/travelguide/route-map?reference=safi978634 

please help...what rule in .htaccess file???

this should trick:

rewriteengine on rewritecond %{query_string} ^$ rewriterule ^travelguide/route-map/(.+) /travelguide/route-map?reference=$1 

see here demo http://htaccess.mwl.be?share=6c2be57a-6bb7-5083-9122-aaf63162b240


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -