.htaccess with friendly URL that allows use of the GET method

Asked

Viewed 484 times

2

Hello, my system makes use of user-friendly URL, however Mercadolivre API authentication returns to my system using ?code=XXXX, what I need is for the site to work in a hybrid way, both with the user-friendly URL and using the $_GET, similar to the following URL: site.com/dashboard/principal?code=XXXXXXXX I have virtually no knowledge in the configuration of this . htaccess so if someone can give me a light I thank you.

This one is mine .htaccess current:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?dados=$1 [L]

1 answer

3

taking a good look at the Internet I found a solution to my problem and am sharing with you:

.htaccess:

RewriteEngine on
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?dados=$1&%{QUERY_STRING} [NC,L]
  • if you can, mark your answer as accepted to make the post more complete (by clicking on the green V on the reply side)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.