php - .htaccess redirect all subdirectories except one -


currently in .htaccess have code redirect requests example.com/folder/ , subdirectories example.com/land.

rewriteengine on rewriterule ^folder/(.+) page [l,r=301] redirect /folder https://example.com/land/ 

example.com/folder/ redirects example.com/land - yes

example.com/folder/sub-a/ redirects example.com/land - yes

now example.com/folder/sub-b/ , example.com/folder/sub-b/page not redirect.

how can achieve this? have tried searching , reading, have not found solution works situation. help.

just redirect all.

and redirect 1 original location!


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -