Help me where I went wrong. 1st time I'm using mod_write
bgb76
7:17 pm on Aug 17, 2012 (gmt 0)
Hi Greetings,
For the first time I'm trying to use mod_write kindly help me to resolve this issue.
RewriteEngine On RewriteRule ^([^/]*)\.php$ /local.php?bangalore=$1 [L]
Thanks in Advance. BGB
[edited by: incrediBILL at 2:39 am (utc) on Aug 18, 2012] [edit reason] removed URLS, see TOS & Charter - paste all relevant data in post [/edit]
phranque
9:04 pm on Aug 17, 2012 (gmt 0)
it's mod_rewrite...
what are you trying to do with mod_rewrite and how is your solution failing?
lucy24
9:50 pm on Aug 17, 2012 (gmt 0)
Hm, shouldn't this be in Apache?
It looks as if he's trying to do the conventional rewrite from pretty URL to real home of content. It should be accompanied by a Redirect going in the opposite direction to grab users who ask for the long ugly URL in the first place.
The wording of the RewriteRule is a bit iffy because it would allow requests in the form
www.example.com/.php
but I kinda doubt that's the problem.
Wander over to the Apache forum and look for the Redirect-to-Rewrite boilerplate. I repost it every couple of weeks. There's also one on query strings which may or may not be relevant. If you want the requested page name to become the new query string, and throw away any previous query string, you've got the right wording already.