views:

80

answers:

4

How can I rewrite the following URL:

http://www.myurl.com/job/Accounting-Clerk-at-Department-of-Workforce-Services-in-Salt-Lake-City,-UT-1b6117567108f5a2

Into these components:

query = Accounting Clerk;
cmp = Department of Workforce Services;
location = Salt Lake City, UT;
key = 1b6117567108f5a2;

To get this result:

index.php?q=$query&cmp=$cmp&l=$location&key=$key
A: 

If you do a Google search for "pretty url" you will find lots of information on this subjects and some nice tutorials.

Marius
A: 

tutorials for htaccess

from Wikipedia

from Apache

Andrew Keith
A: 
RewriteEngine on
RewriteBase /

RewriteRule job/([^.]+)-in-([^.]+) index.php?var1=$1&var2ext=$2

etc continue like that

Lizard
+2  A: 

Try this mod_rewrite rule:

RewriteEngine on
RewriteRule ^job/([^/]+)-at-([^/]+)-in-([^/]+)-([0-9a-f]+)$ index.php?q=$1&cmp=$2&l=$3&key=$4
Gumbo