I would like to define a custom url in .htaccess
, in wordpress it comes by default like this:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On<br>
RewriteBase /sistema/<br>
RewriteRule ^index\.php$ - [L]<br>
RewriteCond %{REQUEST_FILENAME} !-f<br>
RewriteCond %{REQUEST_FILENAME} !-d<br>
RewriteRule . /sistema/index.php [L]<br>
</IfModule>
# END WordPress
When I add this
RewriteRule ^(.*)$ single-perfil.php?amigable=$1
What I want to achieve is that, that template single-profile.php receives the variable (url_amigale).
I must mention that I have a system of people, where in the person table I have a field that says url_amigale I understand that this variable to send would be this friendly = $ 1
when I call the single-profile.php file, I do so
This works for me without using wordpress, but in wordpress it does not work for me and it leaves page not found 404
I want to do this so as not to be creating a post for each person, if not just use a template and the friendly url will come out like this, with the variable that will be received in this case (url_amigable):
mipagina.com/joseperez
Thanks