File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect in Apache

 
Pankaj Halder
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using Apache 2.2.10 (Unix), and want to redirect all the request of
http://mydoamin.com to http://www.mydomain.com

In my .htaccess, I added

RewriteBase /
RewriteCond %{HTTP_HOST} !^www.mydomain.com$ [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]

But it does not work. Should I restart the server for the new .htaccess?

Or should I use httpd.conf instead of .htaccess?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic