- Code: Select all
<VirtualHost *:443>
ServerAdmin webmaster@example.com
DocumentRoot /path/to/doc/root
ServerName name.example.com
ServerAlias \
tst1a.example.com \
tst2a.example.com \
tst3a.example.com \
tst4a.example.com \
tst5a.example.com
ScriptAlias /cgi-bin/ /path/to/doc/cgi-bin/
ErrorLog /path/to/doc/logs/error_log
CustomLog /path/to/doc/logs/access_log combined
Options +FollowSymlinks
RewriteEngine On
RewriteRule ^/foo/(.*)\.php$ https://%{HTTP_HOST}/bar\.php?var=$1 [L]
<SSL config stuff continues...>
</VirtualHost>
The problem is the browser displays the rewritten url (https://%{HTTP_HOST}/bar\.php?var=$1); I want the original, incoming url (^/foo/(.*)\.php$)
Real world example: "https://www.example.com/foo.php" would be rewritten to "https://www.example.com/bar.php?var=foo", but when the page change occurs the URL in the address/location bar should still be "https://www.example.com/foo.php".
Unfortunately, I'm seeing "https://www.example.com/bar.php?var=foo". I don't want that.
And before anyone asks, there are no redirects of anykind within my conf file.
Anyone got any ideas?
Thanks!