homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

Help : mod_rewrite not working
Help me where I went wrong. 1st time I'm using mod_write

 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.

[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]



 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?


 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


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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved