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]
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^128\.199\.254\.7$
RewriteRule ^(.*)$ http://www.yourDomain.com/$1 [L,R=301]
Hi Aaditya,
ReplyDeletecan you please tell me about root folder. Means this file put in web-app or after project folder (Like:- ProjectName/name.htaccess)
Is it works for you?
ReplyDeleteNice article, thank you for sharing the informative article. I have also an article about htaccess
ReplyDelete. Thank you!!!