Joan Nin Joan Nin - 1 year ago 220
PHP Question

Symfony Redirect

guys I'm new with Symfony and I have the follow question to see if this is possible.

Righ now I have an app that runs on Symfony that is located in and I want to if a user visits the URL redirect to another website (since a lot of users tries to brute force the login dashboard) but if I put the Symfony app login URL that is the login dashboard appears.

I have to try to do something with .htaccess but with not luck.


Oli Oli
Answer Source

maybe something like

RewriteRule ^app$ "$1"  [R,L]

in your .htaccess ? The complete login URL will still work because this Rule only catches URLS ending with app

Actually your question is not so Symfony specific. It is more about Rewrite Rules. Also, why not just answer with an error 404 if somebody accesses /app, (here with optional trailing slash) ?

RewriteRule ^app(\/?)$ - [L,R=404]
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download