Welcome to WebmasterWorld Guest from 54.144.107.83

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

yet another mod rewrite question

any help would be well appreciated

     
6:47 pm on Jul 27, 2008 (gmt 0)

Full Member

10+ Year Member

joined:June 24, 2002
posts: 304
votes: 0



I want requests to /projects/this-is-the-id to get rewritten with a rule to /article.php?project_name=this-is-the-id

My RewriteRule is as so:


Options +FollowSymlinks
RewriteEngine On
RewriteRule ^/projects/(.*?)/?$ /article.php?project_name=$1 [L,NC]

I've verified that my .htaccess file is getting picked up. Any help here?

Thanks so much in advance.

10:24 pm on July 27, 2008 (gmt 0)

Junior Member

10+ Year Member

joined:July 17, 2003
posts:60
votes: 0


RewriteRule ^projects/(.*)/*$ /article.php?project_name=$1 [L,NC]
10:36 pm on July 27, 2008 (gmt 0)

Full Member

10+ Year Member

joined:June 24, 2002
posts:304
votes: 0


Holy mess and mother of God!

You rock the T.O.P.!

That worked perfectly!

of course a name like 'TowerOfPower' must have been earned somehow.

Mad props Tower. Thanks so much.

-zuko

10:45 pm on July 27, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


The .* is "greedy" as a pattern match.

There will be a way of simplifying that to make it more efficient.