File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Redirect in Apache Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Redirect in Apache" Watch "Redirect in Apache" New topic

Redirect in Apache

Pankaj Halder

Joined: Sep 10, 2008
Posts: 25
I'm using Apache 2.2.10 (Unix), and want to redirect all the request of to

In my .htaccess, I added

RewriteBase /
RewriteCond %{HTTP_HOST} !^$ [NC]
RewriteRule ^(.*)$$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?
I agree. Here's the link:
subject: Redirect in Apache
It's not a secret anymore!