mod_rewrite changing url in browser address window

New to mod_rewrite? This is a good place to start.

mod_rewrite changing url in browser address window

Postby LaidBackWebSage » Mon Nov 21, 2005 11:35 am

Here is my rule set:
Code: Select all
<VirtualHost *:443>
DocumentRoot /path/to/doc/root
ServerAlias   \ \ \ \ \
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...>

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: "" would be rewritten to "", but when the page change occurs the URL in the address/location bar should still be "".

Unfortunately, I'm seeing "". I don't want that. :)

And before anyone asks, there are no redirects of anykind within my conf file.

Anyone got any ideas?

Thanks! :)
Posts: 1
Joined: Mon Nov 21, 2005 11:17 am

Return to Beginner's Corner

Who is online

Users browsing this forum: No registered users and 12 guests