tags:

views:

32

answers:

1

Hai

I want to know how to use .htaccess in my project. I know simply write the URL in to .htaccess file. After that what is the next step? what I will do to redirect the url ??

+1  A: 

.htaccess configuration files can allow you to do lots of things -- ie, not only redirections.

For more informations, the first place you can take a look is Apache Tutorial: .htaccess files, which should give you a couple of ideas of what .htaccess files are, and when you should use them.

After that, depending on what your hosting provider allows you to do, there are several other things you might be able to do, like, for instance :

  • Redirections
  • activation/deactivation of caching
  • activation/deactivation of content gzipping
  • ...


About Redictions, the basic idea is to :

  • define the conditions upon which redirection should occur
  • write down the RewriteRule that will do the redirection itself.

You'll be able to find some documentation under Apache mod_rewrite, and Apache Module mod_rewrite.

Pascal MARTIN