I have Url as:
localhost/ab/directory.php?id=200
id=200 is jenny id member
how to change it to
localhost/ab/jenny
is possible?
Thanks
I have Url as:
localhost/ab/directory.php?id=200
id=200 is jenny id member
how to change it to
localhost/ab/jenny
is possible?
Thanks
You'll want to use mod_rewrite, a module available in apache. This will be managed by an .htaccess file within your web directory. AddedBytes has a nice tutorial for beginners on url-rewriting.
See: http://www.addedbytes.com/for-beginners/url-rewriting-for-beginners/
You can do this in at least 2 different ways:
/ab
a php script that inspects the PATH_INFO
to retrieve /jenny
. You'll have to configure Apache to treat scripts with no extension as php scripts for this to work./ab
would have to be an actual php script, not a directory as it is in your case. I suggest you go with option 1 as it is the more widely practiced and accepted of the 2 approaches. –
Discuss © 2022 - 2024 — McMap. All rights reserved.
directory.php
. – Discuss