httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Rossignoli" <softw...@polin.it>
Subject Re: [users@httpd] help with url rewrite.
Date Sun, 06 Apr 2003 06:31:36 GMT
Hi,

another solution is:

/articles/.htaccess
#begin .htaccess

# Remove this line if this option is already enabled
Options +FollowSymLinks

RewriteEngine On

RewriteRule ^([0-9]+)/?$ comments.php?id=$1 [L]

#end .htaccess

It's important, as I said previously, that the .htaccess is located in the
articles directory.

The rules I wrote will take a care of the trailing slash that can be
optional,
it means that it will both work for /articles/120 and /articles/120/

:-) Andrea

----- Original Message -----
From: "Jurgen" <apache@squarehosting.com>
To: <users@httpd.apache.org>
Sent: Saturday, April 05, 2003 23:34
Subject: Re: [users@httpd] help with url rewrite.


> Hi,
>
> you could try something close to this. It might need some modifications
> to work in .htaccess
>
> RewriteCond ${REQUEST_URI} !^/articles/comments.php
> RewriteRule /articles/(.+) /articles/comments.php?id=$1
>
> Jurgen
>
> On Sat, 5 Apr 2003 15:35:07 -0500
> "Sebastian" <sebastian@dslr.net> wrote:
>
> > anyone?
> >   ---- Original Message -----
> >   From: Sebastian
> >
> >
> >   hello,
> >
> >   I'd like to make my URL's seach engine friendly.
> >
> >   I would like to make /articles/comments.php?id=120
> >
> >   act as /articles/120
> >
> >   I have mod_rewrite installed, I searched and searched but found
> little> help on how to do this, I would like to use .htaccess if
> possible.>
> >   Thanks in advanced.
> >
> >   cheers,
> >   - Sebastian
> >
> >
> >
>
> ---------------------------------------------------------------------
> 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


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