simple mod_rewrite

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

simple mod_rewrite

Post by psurrena »

I'm new to mod_rewrites. Could any help and tell me what is wrong with this?

Code: Select all

RewriteEngine On
RewriteRule ^job-(.*).html/ index.php?action=1&id=$1
and my php is:

Code: Select all

echo '<a href="view-'.$row['id'].'.html">'.$row['title'].'</a>';
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

Post by psurrena »

I just got it to work BUT now it ignores the external stylesheet...

Code: Select all

<link rel="stylesheet" href="library/style.css" type="text/css" media="screen" title="WRT CSS" charset="utf-8" />

Code: Select all

RewriteEngine On
RewriteRule ^job-(.*).html$ index.php?action=1&id=$1

Code: Select all

echo '<a href="job-'.$row['id'].'.html">'.$row['title'].'</a>';
Any help would be appreciated!
User avatar
psurrena
Forum Contributor
Posts: 355
Joined: Thu Nov 10, 2005 12:31 pm
Location: Broolyn, NY

Post by psurrena »

Forget it - Just a couple reloads fixed everything...
Post Reply