I'm working on a Drupal site, and the client has requested to prevent any direct access other than the URL aliases defined. That is,
- www.clientsite.com -> Allowed
- www.clientsite.com/some-internal-page -> Allowed
- someclientsite.com/node/add -> Allowed
- www.clientsite.com/node -> Denied
- www.clientsite.com/node/72 -> Denied
As you can see, I need to disable /node, /node/ and /node/[0-9]* while allowing any /node/some-link-text
I've tried
<LocationMatch ^/node[\/]?([\d]*) > SetHandler server-status Order deny,allow Deny from all </LocationMatch> but it doesn't work for /node/add, though all other links work. What regex do I need to fit these conditional matches?