0

The challenge is I need to pass parameter received in the URL

Https://mydomin.com/asdfg/website/view.php?v=qwertyuiop

To

Https://mydomin.com/asdfg/website/view/qwertyuiop
3

1 Answer 1

1

Could you please try following.

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(.*)/([\w-]+)$
RewriteRule ^.*$ /%1.php?v=%2 [NC,L,QSA]

OR to check if view.php is present in local path you could try:

RewriteEngine On
RewriteCond %{REQUEST_URI} ^/(.*)/([\w-]+)$
RewriteCond %{DOCUMENT_ROOT}/%1.php -f
RewriteRule ^.*$ /%1.php?v=%2 [NC,L,QSA]
Sign up to request clarification or add additional context in comments.

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.