How to redirect a site to a new site
-
I have a site which has pages like this: blabla.com/page/whatever blabla.com/category/whatever blabla.com/about ... How can I redirect each of these to a new domain, like: blabla.net/page/whatever blabla.net/category/whatever blabla.net/about ... ? Using .htaccess
-
Answer:
Use the http://httpd.apache.org/docs/2.0/mod/mod_alias.html#redirect directive: Redirect / http://blabla.net/ This directive automatically preserves anything specified after the /.
Alex at Stack Overflow Visit the source
Other answers
It might take a bit of fiddling, but the basic idea should work here: RewriteEngine on RewriteRule ^(.+)$ http://blabla.net/$1 [R,NC] You need to have mod_rewrite installed in Apache. This says "match all URLs on this site, and redirect them to http://blabla.net/the same URL. The [R] means to actually send a redirect request to the client (so the client will make the request to the new server), rather than just serving up the page but keeping the browser URL the same. You can take the R out if you just want to serve the page but keep the old URL.
mgiuca
Related Q & A:
- How to build a site?Best solution by Yahoo! Answers
- How to open a site even if its blocked?Best solution by Yahoo! Answers
- How to put a search engine on your site?Best solution by Yahoo! Answers
- How does someone make money owning a web site?Best solution by Yahoo! Answers
- How much would a new suspension and new tires cost?Best solution by cars.costhelper.com
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.