Apache RewriteRule on IRIS
Hi,
I'm attempting to set up an Apache Rewrite Rule so that a url picks up a different csp page.
For example I want Apache http://hostname/csp/test/foo.csp to redirect to http://hostname/csp/test/bar.csp
Here is my example of Cache80.conf
<IfModule mod_ssl.c>
<VirtualHost _default_:80>
ServerName test.domain.com
DocumentRoot "/intersystems/irissys/csp"
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
LogLevel info
<Directory /intersystems/irissys/csp/test>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
RewriteEngine On
RewriteRule "^/foo\.csp" "/bar.csp" [PT]
</Directory>
<Location />
CSP On
SetHandler csp-handler-sa
</Location>
<Location "/csp/bin/Systems/">
SetHandler csp-handler-sa
</Location>
<Location "/csp/bin/RunTime/">
SetHandler csp-handler-sa
</Location>
DirectoryIndex index.csp index.html index.htm
</VirtualHost>
</IfModule>
Unfortunately when I load http://hostname/csp/test/foo.csp in a browser, foo.csp loads instead of the desired bar.csp.
I've tried all sorts of variations of the rule to include directories but nothing I've tried seems to work.
Does anyone have idea what I may be doing wrong please?