Help Setting Up 301 Redirects from Coldfusion Site to Wordpress Site.
-
I have created a new website and need to redirect all of the previous pages to the new one. The old website was built in coldfusion and the new site is built in wordpress.
One of the pages I'm trying to redirect is www.norriseal.com/products.cfm to http://norrisealwellmark.com/products/.
This is what I have in my .htaccess file
<ifmodule mod_rewrite.c="">Options +FollowSymlinks
RewriteEngine On
RewriteBase /
Redirect 301 /products.cfm http://norrisealwellmark.com/products/</ifmodule>The result of this redirect is http://norrisealwellmark.com/products.cfm
How do I prevent the .cfm from appending to the destination URL?
-
Hey Britney,
No, the old (ColdFusion) site and the new (PHP) site are on the same linux (CentOS) server.
The 301 redirect rule I described above in my original post is applying '.cfm' to the end of the destination URL - thats the main issue we're trying to tackle here.
Thanks for responding!
-
Hi Chris,
Are you still using ColdFusion?
It sounds like you're on a Windows server, yeah? If so, adding this to your web.config file should do the trick:
<match url="(.*)"><conditions><add matchtype="IsFile" negate="true"><add matchtype="IsDirectory" negate="true"></add></add></conditions>
<action type="Rewrite" url="{R:1}.cfm"></action></match>Otherwise, adding the following to your web.config for WordPress should work:
<rulename="company cfm"=""><matchurl="^company (.*)$"=""><conditionslogicalgrouping="matchall"><addinput="{request_filename}"matchtype="isfile"negate="true"><addinput="{request_filename}"matchtype="isdirectory"negate="true"><actiontype="rewrite"url="{r:1}.cfm"></actiontype="rewrite"url="{r:1}.cfm"></addinput="{request_filename}"matchtype="isdirectory"negate="true"></addinput="{request_filename}"matchtype="isfile"negate="true"></conditionslogicalgrouping="matchall"></matchurl="^company></rulename="company>
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
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
-
301 redirecting a previously abused URL
A client previously had their most important landing page at domain.com/example.htm They carried out the sort of link building that was commonplace a few years back (exact match anchors, paid blog links etc) targeting this URL, but they also got a bunch of legitimate decent quality links here. I believe they may have had a number of issues when link quality algo updates were rolled out, so rather than try and get links removed and go through the disavow process they instead decided to abandon this URL, let it 404 and start afresh at domain.com/example.html - updating all internal navigation, XML sitemaps etc. So fast forward to today. What is the best practice for this URL these days do we think? Is it now possible to 301 domain.com/example.htm > domain.com/example.html and recover whatever value may be left here? The argument for not doing so may be that you could pass over the negative metrics associated with the old URL, but would this not be handled by the real-time penguin update and the poor links just devalued rather than actually harming? And could this just be tested - i.e. add in the 301, monitor the impact and if things don't go the way we'd want then just remove the 301 again? Would be keen to get a few opinions on this. TIA
Technical SEO | | Salience_Search_Marketing0 -
301 redirection for e-commerce website
Hi moz community, I am the web agency for a e-commerce website. Its current domain is https://www.liquorland.co.nz but now all the e-commerce part will be moved to a sub-domain https://shop.liquorland.co.nz. There are thousands of e-commerce current being indexed in Google (i.e., 15,500) plus they also have a mobile version of the page like /mobile/default.aspx. Is it necessary to 301 redirect all the pages? We are afraid it may slow down the website because the request will go through thousands of filters. Is it OK to just redirect the main categories? Many thanks in advance.
Technical SEO | | russellbrown0 -
Meta descriptions and h1 tags during a 301 redirect
My employer is shifting to a new domain and i am in the midst of doing URL mapping. I realize that many of the meta descriptions and H1 tags are different on the new pages - is this a problem ? Thank you.
Technical SEO | | ptapley0 -
To 301 or not to 301?
I have a client that is having a new site built. Their old site (WP) does not use the trailing / at the end of urls. The new site is using most of the same url names but IS using the /. For instance, the old site would be www.example.com/products and the new site, also WP, will be www.example.com/products/. WordPress will resolve either way, but my question is whether or not to go in and redirect each matching non / page to the new url that has the /. I don't want to leave any link juice on the table but if I can keep the juice without doing a few hundred 301s that certainly wouldn't suck. Any thoughts? Sleepless in KVegas
Technical SEO | | seorocket0 -
301 Redirect domain with penalty
Wondering if I could get a few views on this please... I have added an affiliate store to a domain I own, however I forgot to noindex the product pages which were duplicate content of the merchants. Despite a good deal of backlink building the site will not do much in the engines at all, doesn't even come up on the first few pages for it's own name! This suggests to me that I have a duplicate content penalty. Try as I may I cannot get it removed so am thinking of cloning the domain to a new domain, however, I do not want to lose the links I collected so I am planning on 301ing them. While I will not get all the link power moved over, I should at least get credit for some of them which will kick start the new domain. Can anyone forsee any potential issues with doing this? Is there a danger of 301ing a site with a penalty that the penalty would be carried over? I know there is no penalty on the links, no WMT warnings etc, it is the content causing the issue. Thanks, Carl
Technical SEO | | Grumpy_Carl0 -
Redirect from old wordpress site to new php site? Best approach
Hi I have two websites one legacy site done in wordpress the other in php. However I would like to merge the two together and remove the wordpress site. However it has a good link profile and the pages rank well. What is the best approach to do a 301 redirect from the old site with all its pages pointing to the homepage of the new site? If so what's the best way to do this in wordpress? Many thanks
Technical SEO | | ocelot0 -
Paginated Home Page Duplicates on Wordpress Sites
A number of my websites created on WP are displaying duplicate home pages with these types of urls. http://www.example.com/page/10/ http://www.example.com/page/11/ http://www.example.com/page/12/ I found these duplicates using the site:search command. Basically, put in any number and the Home Page opens. With the above mentioned url structure. Any idea on why they are created, how they can be stopped and what kind of an impact they would have in terms of SEO and the penalty that comes with duplicate content.
Technical SEO | | AsadMemon1