3

I have a URL that looks like:

DomainName/admin_panel/messages.php?order_id=7&to_id=7

I want to convert this URL to:

DomainName/admin_panel/messages

I have create a .htaccess file like below but it's not working on live server as well as on localhost. URL remains the same.. Check the .htaccess file below..

RewriteEngine On  
RewriteBase /
RewriteRule ^messages/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ messages.php?order_id=$1&to_id=$2 [NC,L]

Kindly help me. The website is hosted on Dreamhost. Thanks in advance..

junaid afzal
  • 75
  • 1
  • 2
  • 10
  • Just change your link to `DomainName/admin_panel/messages/7/7` and it should work.. URL rewriting doesn't redirect your page so don't expect to access `DomainName/admin_panel/messages.php?order_id=7&to_id=7` andbe redirected to `.../messages/...` – Mihai Matei Aug 03 '16 at 06:42
  • @MateiMihai Thanks for your reply. Sorry But I did not understand. can you please edit my .htaccess file code that I give above to make it work. Thanks in advance.. – junaid afzal Aug 03 '16 at 06:46

0 Answers0