1
I have another problem with this line
RewriteRule ^([a-zA-Z-0-9-_]+)$ index.php?controller=estabelecimentos&option=tipo&tipo=$1 [L]
solved a problem but now I tried to create the same line but for another file but always falls into that rule establishments how can I fix it ?
htaccess Financial Network
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^comer$ index.php?controller=comer
RewriteRule ^dormir$ index.php?controller=dormir
RewriteRule ^comprar$ index.php?controller=comprar
RewriteRule ^servicos$ index.php?controller=servicos
RewriteRule ^lazer$ index.php?controller=lazer
RewriteRule ^o-que-visitar$ index.php?controller=o-que-visitar
RewriteRule ^contactos$ index.php?controller=contactos
RewriteRule ^login$ index.php?controller=login
RewriteRule ^([a-zA-Z-0-9-_]+)$ index.php?controller=estabelecimentos&option=tipo&tipo=$1 [L]
RewriteRule ^([a-zA-Z-0-9-_]+)$ index.php?controller=ver_estabelecimento&option=tipo&tipo=$1 [L]
I have on route establishments the url to be provided so http://exemplo.pt/traditional i wanted to create another rule equal but to see the establishment corresponding to traditional category but stay in an equal url http://exemplo.pt/cafe I made a rule equal to establishments, but for the ver_establishment file and always falls under the rule of establishments.
Put your
.htaccess
complete and give an example of URL.– André Ribeiro
I already put up with example
– César Sousa
@Césarsousa gives the final example you want for this sff url
– pc_oc
http://exemplo.pt/cafe
– César Sousa
@Césarsousa The final URL he refers to is the internal one that will load PHP.
– André Ribeiro
yes only that instead of loading the ver_establishment file always loads the establishments
– César Sousa
@Césarsousa What is this "ver_establishment"? You don’t have any of this in your . htaccess.
– André Ribeiro
ver_establishment and the file that will show the establishment after the user choose the category in this case establishments I forgot to put the rule I was trying to do already put there
– César Sousa
loads the same because ajax is the same. Try changing the last line by: Rewriterule p/([a-za-Z-0-9-_]+)$ index.php? controller=ver_establishment&option=type&type=$1
– pc_oc
but then I have to use the p before the name
– César Sousa