I have a URL on my website:https://www.miweb.com/componente/nombre/contratar
I would like it not to show "name" since the company has changed, but that the URL continues to lead to the same place, otherwise the hiring does not work.
Is it possible to show the user a URL but point to the real one?
I have done it this way in the .htaccess file with mod_rewrite, but it only redirects me and of course, I get a 404 error.
RewriteEngine On
Rewritebase /
<IfModule mod_rewrite.c>
RewriteRule ^componente/nombre/contratar$ http://%{HTTP_HOST}/componente/contratar$1 [R=302,L]
</IfModule>
How can I solve that?
What you did is perfect as a first step. Just add another rule. What you're looking for is a rewrite : having Apache modify the URL but none of it going to the user as a redirect.