I have this url to access a study on the web:
http://miweb.com/index.php?option=com_component&view=estudio&factura=1&id=25977&token=8f8c54a3ce165332fd59f17
I want a URL similar to the following, redirect to the previous one
http://miweb.com/estudio&factura=1&id=25977&token=8f8c54a3ce165332fd59f17
That is, replace a part of the URL, but keep the other parameters.
So far, I have edited mod_rewrite from the .htaccess file and managed to replace strings (for example com_component
), but not the string index.php?option=com_component&view=estudio
. This gives me an error, will it be for ?&=
?
RewriteEngine On
Rewritebase /
<IfModule mod_rewrite.c>
RewriteCond %{QUERY_STRING} (.*)com_component(.*) [NC]
RewriteRule (.*) $1?%1nuevostring%2 [R=302,L]
</IfModule>
How can I replace the entire line index.php?option=com_component&view=estudio
with a word (eg "study")?
Edit:
Is it possible that the URL will use the URL with all the parameters, but that the part of index.php?option=com_component&view=estudio
does not appear? I do not want the user to see the option and view name, but instead they are parameters that I need for the URL to work