2

How can I add parameter to this url:

http://example.com/?p=10455

for ex:

http://example.com/100/?p=10455

and it will redirect to the same location, only with additional parameter (num=100)?

2 Answers 2

1

Place this rule in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{QUERY_STRING} (^|&)p=10455(&|$) [NC]
RewriteRule ^$ /100/ [L]
Sign up to request clarification or add additional context in comments.

Comments

0

Like this

RewriteRule ^([0-9]+)/$ index.php?num=$1 [L,QSA]

Comments

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.