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
-
Removing Multiple 301 Redirects
During my last redesign (and migration to Drupal) some of the updated SEO friendly url's on the new site were misspelled. Rather than updating the 301 redirects to point to the correct page the developer just added an additional 301 redirect. So it was redirected like this website.com/oldpage (301 to) website.com/new-paige (301 to) website.com/new-page Instead of website.com/oldpage (301 to) website.com/new-page I'll be finishing another redesign and updating to https soon, should I remove the redirect to the misspelled domain and just have one 301 from the original page? These multiple redirects have been up for over a year. Thanks for any specific advice!
Technical SEO | | talltrees0 -
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 -
URL Changes And Site Map Redirects
We are working on a site redesign which will change/shorten our url structure. The primary domain will remain the same however most of the other urls on the site are getting much simpler. My question is how should this be best handled when it comes to sitemaps because there are massive amounts of URLS that will be redirected to the new shorter URL how should we best handle our sitemaps? Should a new sitemap be submitted right at launch? and the old sitemap removed later. I know that Google does not like having redirects in sitemaps. Has anyone done this on a large scale, 60k URLs or more and have any advice?
Technical SEO | | RMATVMC0 -
Hi, I am little bit confused in 301 redirect
Hi, I am little bit confused I have set my preferred domain to www but anyone can access my site via both www and non www domains, do I need to 301 redirect all non www to www or not , If yes then I want to know Why and If no then also I want to Why.
Technical SEO | | amarjitkapur0 -
Please help me critique my friends site
Hi All, I've regularly helped others on this forum when they've asked for tips on how to improve a specific site's SEO. Now I'm asking for the favour in return 🙂 My friend has come to me with a site (http://www.swishplastic.com.au) and asked me to help with SEO and on-page optimisation. I've got a few of my own ideas but there may be a few key things I'm overlooking. If anyone could give a few pointers, it would be much appreciated! Thanks!
Technical SEO | | bradkrussell0 -
Help with bing redirection error
Can somebody help me figure out this bing redirect error. The link to "http://w******/flea-control" has resulted in HTTP redirection to "http://w******/feas/flea-control/".Search engines can only pass page rankings and other relevant data through a single redirection hop. Using unnecessary redirects can have a negative impact on page ranking. I am using wordpress. I am actually linking to the /feas/flea-control/ version. I have looked every where for help. I got this error using bings seo toftware
Technical SEO | | OxzenMedia0 -
301 redirect from root to /index.aspx
I have taken over the SEO for www.domain.net. The way i've inherited the setup is that www.domain.net is 301 redirected to www.domain.net/index.aspx Looking at top pages and linking root domains in Opensiteexplorer I can see that www.domain.net/index.aspx has 1,006 linking root domains www.domain.net has 806 linking root domains. I assume that www.domain.net is passing the value of it's 806 domain links to www.domain.net/index.aspx via the 301 redirect and because of this would expect www.domain.net/index.aspx to be the strongest page on the site and be the url that ranks in the listings for many relevant searches. It appears however that www.domain.net is what is shown in listings and not www.domain.net/index.aspx ?? Can anyone explain why this might be?? If I do a site: search in Google then www.domain.net is indexed and not www.domain.net/index.aspx ??
Technical SEO | | QubaSEO0 -
Delete old site but redirect domain to a new domain and site
I just have a quick query and I have a feeling about what the answer is so just wanted to see what you guys thought... Basically I am working on a client site. This client has a few other websites that are divisions of their company. However these divisions/websites are no longer used. They are wanting to delete the websites but redirect the domains to their name main website. They believe this will pass on SEO benefits as these old division sites are old and have a good PR and history. I'm unsure for DEFINITE, which way is correct?
Technical SEO | | Weerdboil0