.htaccess - HTACCESS VARIABLE Regarding issue -


i have website, in making url clean of htaccess. example. example.com/fathers/?n=name open example.com/father/name

i doing of below code.

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d  rewriterule ^father/([^\/]+)/(\/|)$  fathers/index.php?n=$1 [qsa]   rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d  rewriterule ^father/([^\/]+)(\/|)$  fathers/index.php?n=$1 [qsa] 

my question is, how make

example.com/anythinghere/?n=name open example.com/anythinghere/name 

how can this?

you can use rule in .htaccess:

rewriterule ^anythinghere/([^/]*)$ /anythinghere/?n=$1 [l] 

just make sure clear cache before testing it.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -