Monday, April 6, 2015

.htaccess file for your web application grails application

Write following code in a text file and save with name .htaccess . In case of grails app put it in root folder.


RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^128\.199\.254\.7$
RewriteRule ^(.*)$ http://www.yourDomain.com/$1 [L,R=301]

3 comments:

  1. Hi Aaditya,

    can you please tell me about root folder. Means this file put in web-app or after project folder (Like:- ProjectName/name.htaccess)

    ReplyDelete
  2. Is it works for you?

    ReplyDelete
  3. Nice article, thank you for sharing the informative article. I have also an article about htaccess
    . Thank you!!!

    ReplyDelete