Score:0

How to redirect all subdirectories to a specific directory?

es flag

Say I have domain.com that redirects to domain.com/app

RewriteEngine  on
RewriteRule "^/$" "/app/" [END,NE,R=permanent]

I also want to redirect everything to domain.com/app.

So, domain.com/sub1 or domain.com/sub2 or domain.com/sub3 redirects to domain.com/app

RewriteEngine  on
RewriteRule    "^/$" "/app/" [END,NE,R=permanent]
RedirectMatch  permanent "^(/(?!app/).*)" "/app/" 

It works for the root to app redirection but not to the anything to app redirection.

Does anyone know to do this?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.