I am much less unskilled with ReWrite (not really a master either, though) and so i was wishing somone might have the ability to assist me to.
RewriteRule ^$ index.php?page=home [NC] RewriteRule ^adm$ index.php?page=adm_home [NC] RewriteRule ^adm/stats index.php?page=adm_stats [NC]
Above is really a snippet of my .htaccess file. As you can tell, when someone visits http://world wide web.example.com/adirectory/ it really calls on index.php?page=home, similarly if a person would go to http://world wide web.example.com/adirectory/adm/ it won't hesitate to call index.php?page=adm_home inside the "adirectory".
What I am attempting to achieve is: I wish to have the ability to display alerts on my small pages, and to get this done I wish to simply have the ability to add alert=n (where n is really a number) and therefore possess the redirect as index.php?page=home&alert=n
However, I can not know how you can do this, regex is confusing me. Seeking your help.
You are able to set the QSA flag to instantly append the initially asked for query string towards the brand new one:
RewriteRule ^$ index.php?page=home [L,QSA] RewriteRule ^adm$ index.php?page=adm_home [L,QSA] RewriteRule ^adm/stats$ index.php?page=adm_stats [L,QSA]