Combing a symlink to an external folder with a Rewrite Rule?
- by Tristan
I've created a symlink in an account to an folder external to that user account (although with the same ownership). The symlink works but I'd like to combine it with a RewriteRule, and I'm having problems with that.
For instance I create the symlink with:
ln -s /home/target shortcut
And I add the following RewriteRule to .htaccess:
RewriteRule ^shortcut/([a-zA-Z0-9_-]+) shortcut/index.php?var=$1
This however fails.
Yet if instead of being located in an external folder, the target folder is in the same folder as the shortcut address, then the RewriteRule will work. i.e. it works if the symlink is:
ln -s ./target shortcut
How might I get the RewriteRule working for the case where the target folder is an external folder?