.htaccess Query String Redirect
Linux, Apache, MySQL, PHP
1
Posts
1
Posters
6
Views
1
Watching
-
I want to redirect URLs with a query string to another query string using .htaccess From: https://example.com/?smp=123456 (Any number after =) To: https://example.com/?p=123456 (Same number as in From URL) Please suggest me a code. I tried following but it's not working.
RewriteEngine on
RewriteCond %{QUERY_STRING} ^/?smp=([0-9]+)$ [NC]
RewriteRule ^$ https://www.example.com/?p=$ [R=301,L]