Hello to all,
I have apache installed on ubuntu, the re-written module is configured correctly, but one of the rules insists not work.
.htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^test/([a-z0-9-]+)/([a-z0-9-]+)-([a-z0-9-]+)/?$ /cidade.php?cod=$3 [NC] RewriteRule ^cidade/([a-z0-9-]+)/([a-z0-9-]+)-([a-z0-9-]+)/?$ /cidade.php?cod=$3 [NC] </IfModule>
cidade.php <?php print_r($_GET); ?>
The url /test/el-monte-cl/587-369451/ print: Array ( [cod] => 369451 ). Its ok. But /cidade/el-monte-cl/587-369451/ print: Array ( )
The rules are identical, only changes the prefix (city / test). Maybe someone can tell me a solution?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.