Reputation: 57
Hello today i was changing my urls and every single one went well but this one is not accepting the word i want.
Here's is the code line:
RewriteRule ^organizador/?$ organizador/index.php [NC,L]
Strange thing happening:
if i change the ^organizador/?$
to ^org/?$
it works.
And i'm sure that htaccess is working because i have other urls and i also tried to throw junk at the code and it gives me the error code 500 successfuly.
Any idea why it happens with that word only?
Full .htaccess:
Options +FollowSymLinks
Options -MultiViews
RewriteEngine On # Ligar a função de rewriting
RewriteRule ^organizador/?$ organizador.php [NC,L] # Reconhecer "organizador"
# URL principal
RewriteRule ^/?$ index.php [NC,L]
# URL principal
RewriteRule ^inicio/?$ index.php [NC,L]
# URL para administração
RewriteRule ^admin/?$ admin.php [NC,L]
#Conta
# URL para activar a conta
RewriteRule ^conta/activate/([A-Za-z0-9-]+)/([A-Za-z0-9-]+)/?$ conta/activate.php?user=$1&cod=$2 [NC,L]
# URL para sair da conta
RewriteRule ^logout/?$ logout.php [NC,L]
# URL para entrar na conta
RewriteRule ^login/?$ login.php [NC,L]
# URL para login com erro
RewriteRule ^login/([A-Za-z0-9-]+)/?$ login.php?erro=$1 [NC,L]
# URl para criar conta
RewriteRule ^registar/?$ registar.php [NC,L]
# URL para visualizar o perfil
RewriteRule ^conta/?$ conta/perfil.php [NC,L]
# URL para visualizar o perfil
RewriteRule ^conta/perfil/?$ conta/perfil.php [NC,L]
# URL perfil com 1 entrada
RewriteRule ^conta/perfil/([A-Za-z]+)/?$ conta/perfil.php?opcao=$1 [NC,L]
#Eventos
# URL para ver os eventos
RewriteRule ^eventos/?$ eventos/index.php [NC,L]
# URL eventos com 1 entrada
RewriteRule ^eventos/inicio/([A-Za-z-]+)/?$ eventos/index.php?tipo=$1 [NC,L]
# URL eventos com 1 entrada
RewriteRule ^eventos/inicio/([0-9-]+)/?$ eventos/index.php?page=$1 [NC,L]
# URL para criar eventos
RewriteRule ^eventos/criar/?$ eventos/criar.php [NC,L]
# URL criar com 1 entrada
RewriteRule ^eventos/criar/([A-Za-z0-9-]+)/?$ eventos/criar.php?opcao=$1 [NC,L]
# URL para visualizar eventos detalhadamente
RewriteRule ^eventos/visualizar/([A-Za-z0-9-]+)/?$ eventos/visualizar.php?evento=$1 [NC,L]
# URL para visualizar eventos detalhadamente
RewriteRule ^eventos/visualizar/?$ eventos/visualizar.php [NC,L]
# URL para inscrever nos eventos
RewriteRule ^eventos/inscrever/([0-9-]+)/([A-Za-z-]+)/([0-9-]+)/?$ eventos/inscrever.php?evento=$1&tipo=$2&passo=$3 [NC,L]
# URL para inscrever nos eventos 2 campos
RewriteRule ^eventos/inscrever/([0-9-]+)/([A-Za-z-]+)/?$ eventos/inscrever.php?evento=$1&tipo=$2 [NC,L]
# URL para inscrever nos eventos 1 campo
RewriteRule ^eventos/inscrever/([0-9-]+)/?$ eventos/inscrever.php?evento=$1 [NC,L]
#Administração
# URL para ver a administração
RewriteRule ^administracao/?$ administracao/index.php [NC,L]
#Organização
# URL para ver o painel de organizador
RewriteRule ^organizado/?$ organizador/index.php [NC,L]
I'm sorry about all the portuguese words, if you have any doubt just point it out.
Upvotes: 1
Views: 347
Reputation: 785276
Ok you have 2 contradictory rules.
Rule one:
RewriteRule ^organizador/?$ organizador.php
Rule two:
RewriteRule ^organizador/?$ organizador/index.php [NC,L]
Only first one will work because that converts request URI to organizador.php
hence 2nd one never fires.
Upvotes: 1