redirect everything after some folder path / using .htaccess on (Apache/2.4 Server) -


http://sdfitness.4hilton.com/trainers/dummytext

i'm interested redirect after /, in case "dummytext", trainers page.

this rule matches url starting trainers/ , 301 redirects trainers, dropping comes after, including query string.

rewriterule ^trainers/.+ trainers? [r=301,l] 

demo here: http://htaccess.mwl.be?share=c889e6a3-54cf-5e2f-b62d-bbdce6bea6bb


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -