php - posting data to a web page,need an alternative -


to request data web server, can use method,like

www.example.com/?id=xyz

but want request data

www.example.com/xyz

how can achieved in php?

create file in root directory , call .htaccess. put in it:

rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php?$1 [r=301,l] 

if goes www.example.com/xyz , xyz not directory or file load /index.php?xyz instead. transparent users.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -