Forum Moderators: phranque
I am very new to the whole mod_rewrite thing, and I may be labouring under a certain misconceptions about what you can and can't do, but what I want to do is to rewrite all urls like this:
[domain.com...] to
[domain.com...]
This I have acheived using the following .htaccess file:
RewriteEngine On
RewriteRule ^property_for_sale/([^/]+)/?$ /tesp.php?1=$1 [L]
RewriteRule ^property_for_sale/([^/]+)/([^/]+)/?$ /tesp.php?1=$1&2=$2 [L]
RewriteRule ^property_for_sale/([^/]+)/([^/]+)/([^/]+)/?$ /tesp.php?1=$1&2=$2&3=$3 [L]
The problem is that apache is not doing this internally but is using an HTTP 301 Moved Permanently response to redirect the browser to the new URL. This changes the URL displayed in the browser to the new URL where as I would like that the original URL is kept and it looks like pages are being served from there and not the php script.
Any help would be greatly appreciated,
Jamie
Jim