Tell me more ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I need, but dont know how to make, an htaccess file that will send user, when looking for the home page for example, to index.php but not when look for a url like /7fg4/. Adfly, to the best of my knowledge, works like this: you make a link, it stores the shortened link. When the user tries to open the link the htaccess file sends them the contents of another file which reads the url and proceeds accordingly. My website will work almost exactly as adfly does.

Can anyone explain or write an htaccess file that would do this?

share|improve this question
4  
do a google search for mod_rewrite, then come back to SO when you have a specific problem with your code – Lawrence Cherone Feb 17 '12 at 22:35

migrated from stackoverflow.com Feb 18 '12 at 3:37

1 Answer

I suggest you read into the basics of URL rewriting. Or do you have any specific problem?

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.