.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -


could can explain me .htaccess code doing?

 rewriterule ([0-9]+)/([^t]{1}[a-za-z0-9_-]{0,})\.([^s]{1}[a-za-z0-9]+)$ ../items/go.php?u=$1/$2.$3 

i have folder : mywebsite.com/download/folder1/ .htaccess file in uplevel mywebsite.com/download/ folder contains code above.

when access file directly path mywebsite.com/download/folder1/file.mp4 returns error :

mywebsite.com redirected many times. try clearing cookies. err_too_many_redirects

i tried clear browser cookies issue persist. issue solved when commented out htaccess line above.

this rule appears looking specific pattern consisting of:

<numbers>/<alphanumeric string not starting t , other conditions applied>.<alphanumeric string not starting s> 

then redirecting user's browser go.php parsed filename passed file arguments.

err_too_many_redirects due infinite redirect loop. without knowing other rewriterule statements present difficult narrow down exact cause. can narrow down further on end seeing if rewritten output might match other rewriterule conditions.

in general, rule looks suspicious example input given. if home-grown suggest rewriting entirely, current form given unexpected outputs user-generated data cause security holes present in go.php script exploited / exposed.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -