mod rewrite - Alter GET variable in Wordpress -


i working on wordpress self-hosted website, standard .htaccess settings:

in website, have page called "animalpage". using rewrite settings, shown in address bar http://www.example.com/animalpage.

i using custom page template , processing things, include use of variables. instance:

if (isset($_get=['word'])) { echo $_get['word]; } so, http://www.example.com/animalpage?word=cat display "cat".

the problem have rewriting url can like: http://www.example.com/animalpage/dog, still being able access "dog" variable.

i not mod_rewrite rules begin with, working within wordpress installation throwing me curveball.

does know need add .htaccess achieve this?

thank you!

old version:

rewriterule ^animalpage/([a-z0-9]+)/?$ animalpage?word=$1 [nc,qsa] 

revisited:

rewriterule ^animalpage/([^/])/?$ animalpage?word=$1 [nc,l,qsa] 

Comments

Popular posts from this blog

mysql - Dreamhost PyCharm Django Python 3 Launching a Site -

java - Sending SMS with SMSLib and Web Services -

java - How to resolve The method toString() in the type Object is not applicable for the arguments (InputStream) -