httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] mod_rewrite problems
Date Wed, 31 Aug 2005 20:02:30 GMT
On 8/31/05, Jennifer Zelazny <jzelazny@sandboxdev.com> wrote:
> Hello.  I have what I thought would be a simple mod_rewrite need, but
> a few hours later, I need some help.
> 
> I have some URLs that are ugly: http://www.example.com/modules/
> content/index.php?id=14 which I would like to change to:
> http://www.example.com/help.php.  I tried creating a .htaccess file
> with:
> 
> 
> <IfModule mod_rewrite.c>
> RewriteEngine On
> 
> RewriteRule ^/modules/content/index.php\?id=14$ /help.php [L]
> 
> </IfModule>

1. Get rid of the <IfModule> stuff.  It just hides useful errors.

2. See the note on the query string under 
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewriterule

3. The correct result will look something like
RewriteEngine On
RewriteCond %{QUERY_STRING} ^id=14$
RewriteRule ^/modules/content/index.php /help.php

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message