The HTTP response status code 301 Moved Permanently is used for permanent redirection. This status code should be used with the location header.

learn more… | top users | synonyms

137
votes
5answers
16k views

Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted How to Know about Mod_Rewrite Rules but Were Afraid to Ask

This is a Canonical Question about Apache's mod_rewrite. Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This ...
7
votes
1answer
12k views

Nginx reverse proxy + URL rewrite

Nginx is running on port 80, and I'm using it to reverse proxy URLs with path /foo to port 3200 this way: location /foo { proxy_pass http://localhost:3200; ...
10
votes
2answers
925 views

best way to handle thousands of permanent redirects

We've a list of 3000 301 redirects. We need assistance on What would the best place to put these? It seems putting these 3000 lines inside vhost in httpd.conf would be a mess. What are recommended ...
0
votes
1answer
354 views

301 IIS Redirect

How do I 301 direct all traffic from domain1.com to domain2.com using IIS? Also I need domain1.com/page.aspx?params to direct to domain2.com/page.aspx?params.
0
votes
1answer
314 views

.htaccess 301 redirect, same server

I set up a website at mywebsite.net, but recently bought the domain mywebsite.com. Now I updated the information on Google via Webmaster Tools and it recommended we set up a 301 redirect from the ...
0
votes
3answers
664 views

mod_ReWrite to remove part of a URL

Someone has incorrectly linked to some of my urls causing 404 erros in Google Webmaster Tools. Here is an example Linked URL: http://www.example.com/foo-%E2%80%8Bbar.html Correct URL: ...
0
votes
1answer
660 views

Nginx 301 redirection for WordPress after migration

We recently did a migration from a "custom CMS" (coded from scratch) to our current technology news/reviews site, MuyComputerPRO, which we installed in WordPress a couple of weeks ago. The migration ...
0
votes
2answers
407 views

Can reduce the rewriteRule to one rule from multiple RewriteConds for 301 in htaccess?

I am doing 301 redirects for old sites to a single site, rather then having to add the same RewriteRule more then once, is there a way to say write it once? that way i just need to add the rewriteCond ...