Hi, What I would do is RewriteRule with just [L] tag for internal redirection or [R,L] if you don't mind the redirection to be external. I've got all this working. However, we currently have a PHP script that's used to catch requests that are not in our static map. It is spawned from Joomla. Normally, when a URL like the following is requested and no match is found in our static map: https://linuxsecurity.com/content/view/127853 it is then passed onto the PHP script from within Joomla that
sets the Location to something like: https://linuxsecurity.com/redirection/index.php?type=view&ids=127853&uri=/content/view/127853/ The redirection.php script's function is to perform an SQL query
that tries to identify the current name from that article ID and
redirects the user to something like the following: https://linuxsecurity.com/news/network-security/the-changing-security-threat-of-email-attacks I'd like to be able to use the static map for the IDs I do know,
and send any others to the redirect script directly from within my
apache config directly. Is this possible? Something like this: RewriteEngine on RewriteRule "/content/view/([0-9]{6})/?" "https://linuxsecurity.com/redirection/index.php?type=view&ids=$1&uri=$1" I don't see how this would work, since both rules contain the
same pattern. Ideas on how to go about this would be appreciated.
Perhaps a RewriteMap prg rule? RewriteMap mapper "prg:/etc/httpd/conf.d/mapper.php" Thanks,
|