I've the URL http://localhost/mydirector/, I wish to echo mydirectory and never possess a 404 error. mydirectory doesn't exist like a directory, but is taken as username. I'm using Home windows/apache/MySQL,PHP. All of this happening on localhost or 127...1

Thanks Jean

if mod_rewrite is not what you would like, perhaps you have looked into mod_userdir?


You should utilize mod_rewrite to ensure that it internally rewrites the Hyperlink to another URL.

For instance:




You'll be able to have index.php to see and echo the 'z' parameter value.

There's enough detailed information online around the internet about using mod_rewrite to get this done. For instance: http://articles.sitepoint.com/article/guide-url-rewriting