Chained address rewrite in Wordpress
- by kemp
What I need to do is rewriting this address:
(1) http://localhost/wordpress/fake/text-value
to
(2) http://localhost/wordpress/gallery?somevar=text-value
Notes:
the remapping must be transparent: the user always has to see address (1)
gallery is a permalink to a wordpress page, not a real address
I basically need to rewrite the address first (to modify it) and then feed it back to mod rewrite again (to let wordpress parse it its own way).
Problems
if I simply do
RewriteRule ^fake$ http://localhost/wordpress/gallery [L]
it works but the address in the browser changes, which is no good, if I do
RewriteRule ^fake$ /wordpress/gallery [L]
I get a 404. I tried different flags instead of [L] but to no avail. How can I get this to work?