.htaccess when integrating one website into another
-
My client would like to integrate one of it's smaller websites into its main website.
I've identified around 20 pages which I'd like to 301 redirect to specific pages on the main website, and this is simple enough.
The problem I have is that I am not sure how I can then put a catch-all to redirect all other pages on the site to the homepage of the main website.
I'd originally though something like this would work:
redirect 301 / http://www.mainwebsite.com/ (catch-all)
redirect 301 /about.asp http://www.mainwebsite.com/about (specific redirect 1)
redirect 301 /latest.asp http://www.mainwebsite.com/news (specific redirect 1)
etc.Any ideas?
-
Just had a eureka moment with the issue as above!
All that was needed was a .htaccess on the old site like this:
Redirect 301 / http://www.newsite.com/
This attempts to pass a user/crawler to the equivalent page on the new site (which doesn't exist), so this is then handled with a .htaccess on the new site which then redirects to the new versions of those pages:
Redirect 301 /about.asp http://www.newwebsite.com/about (specific redirect 1) Redirect 301 /latest.asp http://www.newwebsite.com/news (specific redirect 1)
Simples!
-
You should be able to achieve what you want by redirecting 404s. You can do this by adding the following to your .htaccess
ErrorDocument 404 /homepage.html
Where homepage.html is the address of your homepage.
What would be better really though is to land them on a an actual 404 page that explains that the page doesn't exist anymore and gives them options of where to go next. Include direct links to the most popular content on the site.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
I have a GoDaddy website and have multiple homepages
I have GoDaddy website builder and a new website http://ecuadorvisapros.com and I notices through your crawl test that there are 3 home pages http://ecuadorvisapros with a 302 temporary redirect, http://www.ecuadorvisapros.com/ with no redirect and http://www.ecuadorvisapros/home.html. GoDaddy says there is only one home page. Is this going to kill my chances of having a successful website and can this be fixed? Or can it. I actually went with the SEO version thinking it would be better, but it wants to auto change my settings that I worked so hard at with your sites help. Please keep it simple, I am a novice although I have had websites in the past I know more about the what's than the how's of websites. Thanks,
Technical SEO | | ScottR.0 -
My website is not avaliable, will i lose ranking?
My website was not available during 12 hours and i think that i will lose ranking by that. What do you think about it? Will i lose rankings? Some URL were lost during the drop of server, what should i do? Create again? Delete on GWT? Thanks so much.
Technical SEO | | pompero990 -
Why did google pick this page to rank over another one?
I recently started working here and I have noticed that google is ranking some pages over other for the main key word. Example: We are ranking on page one for ATV tires for this url http://www.rockymountainatvmc.com/t/43/81/165/723/ATV-Tires-All I thought google would pick http://www.rockymountainatvmc.com/c/43/81/165/ATV-Tires since it is higher up in the folders. I Have a couple reasons why the are picking the other one. Mostly from link signals from one other site and footer link.. Any other thoughts. If we want google to rank the second url instead what would you suggest?
Technical SEO | | DoRM0 -
New website
Hello, How bad is going to be if I change my Joomla website to Wordpress? I can check the 100 best pages and redirect them to the new url with 301 but my website has 424 pages. If is this needs time, how long does it take to be in the same position? Is Google review my new website quickly? What about if I make my services more specific and the main topic is going to be smaller in pages? (Mpre social services pages vs. less pages about the main webdesign topic) I should change my website to WP but I am afraid because now I am in the 2. 🙂 Thanks! Regards,
Technical SEO | | Netkreativ
Misi0 -
Websites not being included on google from mobiles?
Hi, Just had a call from a guy saying that google have made a statement saying that it will be stopping people finding websites from mobule devices if they dont have a mobile domain name. Doesn anyone know anything about any Google statements or is this just rubbish?
Technical SEO | | Ant710 -
Optimizing a website which uses information from a database
Hi, Sorry if this question is very general. I am in the process of building a website for local business, and it it will be heavily dependent on a database. The database will contain loads of information which can be optimized such as business directory listings, articles, forums, questions and answers etc. The businesses will also be able to link to and from the site. Which is the best way to display this information so that it can be optimized the best? I was going to use drop down boxes on a single page, ie main category, sub catagory, then display the business listings based on this. However, as the information on the page changes constantly based on the drop down the robot / user uses, I am assuming this is very hard to get optimized well. Does anyone know a better way? Thanks.
Technical SEO | | PhatJP0 -
.htaccess help please
Hi there, Can anyone let me know what I need to add to my .htaccess file to make sure that the trailing slash on my domain gets redirected to my main domain name. For example, at the moment Google is seeing my primary domain as follows: http://www.mydomain.com http://www.mydomain.com/ I thought I'd covered off all possible duplication penalities but it look as though I've still got one left! Thanks very much for your help, Simon
Technical SEO | | theshortstack0 -
Seo template for new website
I am revamping my website (www.UltimateBasicTraining.com). It's going to be major and I am concerned about the potential traffic loss since over 60% of my overall traffic comes from organic search results in the military basic training area. Are there any good SEO website templates I can start from? I see a lot out there but would prefer the advice of professionals. Thanks
Technical SEO | | TheVolkinator0