php - Troubles Overwritting Wordpress Url Rewrites -


so right have plugin enabled allow me use php in pages. i've setup page , set permalink homepage. doing i'm able make requests like

http://mysite.com/?profile=rihanna 

and php code execute based on given artist.

the issue appears when try make url more seo friendly, add following rewrite rule .htaccess

rewriterule ^artist/(.*).html http://mysite.com/?profile=$1 

thinking should work not, goes wordpress 404 page. if redirect regular html file instead of mysite.com/?profile=$1 works fine.

does have idea what's wrong , how can working properly?

thanks

make sure rule before of wordpress rules. wordpress' rules route requests through index.php , since "artist" bad permalink, it'll return 404.

additionally, if include http://mysite.com in rule's target, inherently redirect browser opposed internally rewriting uri. should remove , include [l] flag rewriting stops in current iteration (thus wordpress rules won't applied):

rewriterule ^artist/(.*).html /?profile=$1 [l] 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -