Capturing variables with rewrite (.htaccess) does not work when changing hosting

0

I have a website in php where I mask the urls by "friendly" using the following .htaccess :

RewriteEngine On    # Turn on the rewriting engine
# not rewrite css, js and images

RewriteCond %{REQUEST_URI} !\.(?:css|js|jpg|gif|png)$ [NC]

RewriteRule    ^inicio    index.php    [NC,L]

RewriteRule    ^contacto    contacto.php    [NC,L] 

RewriteRule    ^faq         faq.php         [NC,L] 

RewriteRule    ^registro    registro.php    [NC,L]

RewriteRule    ^perfil/([([0-9]+)/(.*)$    perfil.php?id=$1    [NC,L]

This worked perfectly on a server, but when migrating to the production server, the last one stopped working, which is the one that interests me most, where I must send a value for the variable get, id.

I have consulted the support of hosting and I have not had an answer. Maybe I can use another form of rewrite , or make some configuration in cpanel ( hosting shared without access ssh )

Any suggestions?

Thankful in advance, Luis Vásquez

    
asked by Luis Vásquez 09.11.2018 в 00:03
source

0 answers