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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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