0

I just want to have a nicer URL for our website, I have a query strings and I want to make like this if it's possible.

My original URL: https://minedbp.com/busact.php?ba=36&act=banking-finance

I want to become like this but with 301 redirect. https://minedbp.com/banking-finance

is it possible without loosing the value for our parameters?

1 Answer 1

1

This must work :

  RewriteEngine On
  RewriteRule ^([^/]*)/([^/]*)$ /busact.php?ba=$2&act=$1 [L]

This transform the following URL

https://minedbp.com/busact.php?ba=36&act=banking-finance

in

https://minedbp.com/banking-finance/36

Sign up to request clarification or add additional context in comments.

2 Comments

I have tried just now, it seems it's not changing the URL to my desired result. And one more thing, how can I pass the parameters to .htaccess? these are all dynamic values. thanks
Sorry, but still it seems it's not working. Thanks for the quick response.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.