I am trying to redirect everything from /app/…. to a certain page – will use that later for angular js.
This is what I came up with :
add_rewrite_rule('/app/.*', 'index.php?page_id=11', 'top');
However this doesn’t work…
In settings->permalink
when I set it to: domain/sample-post/
– it sami-working domain.com/app/{number}
will work and redirect to app – nothing else though. like : domain.com/app{anything else}
wont work.
When I try different permalink setting I get different results.
what you probably want is:
But you need to tighten up the url structure as much as possible, for example the above will match
/appetizer
/applease
etc. since they are all leading to the same page your first attempt was probably correct,/app/
and then add whatever you want after the/