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

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -