php - How to Redirect if bad url comes on laravel? -
how redirect / handle when add <script>document.cookie<%2fscript>
in url, tried alot didn't success. like:
www.localhost.com/<script>document.cookie<%2fscript>.
is there way handle via route file or htaccess file? if there please me solve that.
if want via apache htaccess, can use example:
<ifmodule mod_rewrite.c> rewritecond %{query_string} (\<|%3c).*script.*(\>|%3e) [nc,or] rewritecond %{query_string} globals(=|\[|\%[0-9a-z]{0,2}) [or] rewritecond %{query_string} _request(=|\[|\%[0-9a-z]{0,2}) rewriterule .* index.php [f,l] </ifmodule>
Comments
Post a Comment