apache - mod_rewrite specific urls only -


mod_rewrite worst enemy , cant life of me figure out whats going wrong, scrapped htaccess content had in hope clever fools can dumb fool!

we want 3 links re-written effects these.

index.php?portfolio=print 

into

portfolio/print 

and

index.php?portfolio=branding 

into

portfolio/branding 

and

index.php?portfolio=illustration] 

into

portfolio/illustration 

however dont want effect links such index.php?portfolio=photography.

so ideally guess 3 lines 3 rules re-write links, base dir /new/.

hope ya guys can :)

thanks again!

owen

rewriterule ^portfolio/(print|branding|illustration)$ index.php?portfolio=$1 [l] 

this match describe using 1 rule 2 assumptions - no trailing slash or query string parameters.

comment if expect either in urls. can add section appending capture.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -