We help IT Professionals succeed at work.
Watch Question

You need to look at .htaccess files.  An .htaccess file modifies the directory it exists in and any directories under it.  So you would put yours in your root level web directory (http://www.trytlc.com)

Within this .htaccess file, you'd write the following (I don't have a way to test this at the moment but I'm pretty sure this will work)
RewriteEngine On
RewriteRule dward\/(.*)$ http://www.trytlc.com/$1?user=dward [L]

Open in new window


Thank you veyr much for the help. The only problem I have now is that the dward part of the url is dynamic and can change with every user. So how would I modify this to reflect that.

RewriteEngine On
RewriteRule dward\/(.*)$ http://www.trytlc.com/$1?user=dward [L]

What you'll have to do is say (pseudocode)
http://www.trytlc.com/USER/FILE = www.trytlc.com/FILE?user=USER.  The problem with that, though is that kills all your real subdirectories in your domain.  So you'll have to have some kind of user delimiter (frequently a tilde), which will make it www.trytlc.com/~dward/FILE.

Your other option is www.trytlc.com/users/dward/FILE.

Which one would you like the script for?


I think the delimeter with the tilde would be the best bet for my application.

This one is on us!
(Get your first solution completely free - no credit card required)

Ahhh, add an [L] on the end as in the first example.


Thank You very much for the help. I appreciate it greatly.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.