-3

Please somebody help me to get url mod rewrite like following. My url is mydomain.com/music/album.php?id=1234&title=sometext&page=2&lang=en

I want this url like following

mydomain.com/music/1234/sometext/?page=2&lage=en

UPDATE: Mypage: mydomain.com/cms/album.php?id=12493&album=text-to-show

I have rewritten this url to

RewriteRule ^music/([^/])/([^/]).html$ /cms/album.php?id=$1&album=$2 [L]

My MODDED URL: mydomain.com/music/12493/text-to-show.html


Problem: My album.php has more $_GET variable which i want to handle them like a normal script. like mydomain.com/music/12493/text-to-show.html?page=1 should act on server as mydomain.com/cms/album.php?id=12493&album=text-to-show&page=1

Note: i can rewrite like mydomain.com/music/12493/text-to-show/2.html but this is not which i am looking for.

decoded
  • 25
  • 4

1 Answers1

0

This is a snippet without checking for integer / string, you can use this but it is adised to rewrite it to your needs.

RewriteRule ^([^/]*)/([^/]*)$ /music/album.php?id=$1&title=$2 [L]
Dávid Szabó
  • 2,119
  • 1
  • 12
  • 24
  • I tried it but its not working. i want extra pera meter without rewriting url. Few portion of url will be rewritten and rest of url i want to handle like normal url with additional perameter. mydomain.com/music/1234/sometext/?extraParam=extravalue&extraParam2=ExtraValue2 – decoded Aug 03 '14 at 15:20