URL with fixed and variable parameter

1

Hello, I'm having difficulty setting my htaccess file, I have a fixed parameter that I manually pass and one that depends on the user when I click and change uf, follow the example

RewriteRule ^representantes\/(.*)$ representantes.php?i_page=3&uf=$1

The UF parameter would depend on the user when they click on a link and change the state (uf) the i_page would be fixed. The URL would look like this:

link

link

UPDATE

I tried something like

RewriteRule ^representantes?uf=(.*)$ representantes.php?i_page=3&uf=$1

I have not yet had the expected result.

    
asked by anonymous 08.10.2018 / 16:23

1 answer

0

After much searching I found a solution:

RewriteRule ^representantes?(.*)$ representantes.php?i_page=3&uf=$1 [QSA,L]

This rule sends the fixed parameter and the UF, so I can redeem the values by $ _GET. And still remove the .php from the url leaving it more friendly.

    
08.10.2018 / 19:13