301 Redirect from ASP.NET to PHP...Is it possible?
-
Hi all,
I'm trying to migrate my current website over to wordpress however my current website is ASP.NET and obviously Wordpress uses PHP.
Is it possible to perform a 301 redirect from a asp.net to a php?
Or do you need to convert the asp.net language into php?
Or something different?
I welcome your thoughts?
Regards,
Thomas Rochford
-
Yes that's correct, or even on the same hosting account
-
Many thanks guys, I think I get what your saying.
From what I understand I could just do this...
I build up a new wordpress website on a different hosting account. Within the .htaccess file I create my 301's. Then once I point the domain from the old hosting and website to my new one everything should work fine?
Again many thanks for your help.
-
Hello Thomas,
sorry for my late answer.
As Alan was saying, the web server intercepts a request before it serves a page. If it finds a rule that redirects that request, there is no need for the files to exist. So you would manage the rules for the request that you want to redirect on the same server where the old domain is located. If you are redirecting to the same domain, then yes, this means the rule will be on the same server that manages that domain. When somebody looks for your page, then the DNS would point to your server's IP. After that, the request is sent to that IP and the web server will try to serve whatever is needed for that request. But if you successfully add a rule for that specific request (let's say "www.mydomain.com/page1") to be sent to another URL (let's say "www.mydomain.com/newpage"), then the server will redirect that request.
-
Yes.
you don't need both sets of files.
before the request reaches your pages, it is intercepted by the webserver and checks for any 301 rules. if it finds one for that url it will redirect, even if neither of the files exist. this all happens early in the request life cycle.
But as I said before, make things easy for yourself, only 301 the pages that had external links
-
Hi guys,
Thanks for replying. Wondered however how you would get both the files to sit on the same hosting?
I know that windows can take both PHP and ASP.NET but I have heard that windows hosting for WordPress is not as straight forward as Linux. Is it still possible to perform 301 redirects for both sets of files in Linux?
Regards,
Tom
-
I would find any pages that's have external links, and only 301 them, as there is no use 301'ing pages that have no external links, you can 301 any url you want, the language is not relevant.
What server are you on IIS(Microsoft) or Apache? For Apache then use .htaccess for iis use web.config
Me myself I would not be moving to WordPress, you will end up with many more crawling problems
-
Hello Thomas,
I did not code ASP.NET, but from my understanding, a 301 redirect does not need to be connected to the language you write code in. You could perform a 301 redirect from your web server for example (in Apache you could use the htaccess file).
Anyways, I think you should redirect from your asp.net file to php and everything will work ok. You can check the link below for some code examples I have found searching on Google.
http://www.webconfs.com/how-to-redirect-a-webpage.php
http://www.beyondink.com/howtos/301-redirect.php
Hopefully this helps!
Cristian
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 Redirect from Authoritative but Loosely-Related Domain
We acquired a health-related blog about a year ago with good domain authority and a pretty strong link profile (TF ~40). We have been publishing good relevant content in it but it's not really paying dividends and we are considering doing a 301 to our money site, which is focused primarily on senior issues but has a lot of health-related content. The question is - with the two domains only being loosely related in subject matter, do we stand to harm our main site by redirecting from the other domain?
Intermediate & Advanced SEO | | sa_787040 -
Too many 301 Redirects caused lower rankings :(
1. Ok so I code my eCommerce site myself first 2. Then switched to Shopify and re-direct all my URLs (terrible mistake) 3. Then Shopify didn't do in terms of seo, so I switched to BigCommerce and re-direct all my URLs (Yes I know but at least this platform is much better) I started getting 404 errors as you can imagine in webmaster tools after switching from Shopify and there were 504 of them. Why its too many because I realized that Shopfiy just creates so many urls for the same pages. One by one I re-direct them to their new destinations. As you can imagine my rankings dropped. As my site speed is now 5.5s at gmetrix. mobile 47 - desktop 80 on Google Site speed tool. Looking at the links now, some of the 404's does not make sense to redirect. How should I approach this? Should I remove some of them if they were not used on web anywhere, no sites linking to that page and let them die in time? OR Should I keep them all? I am giving some examples below, there are so many for each. Thank you all! /account/login/ /blog/?page=7 blog/tagged/recipe /blogs/news /blogs/news?page=6 /collections/all/category-name /collections/frontpage/category-name /collections/frontpage/products/product-name /collections/shop/category-name /collections/shop/products/product-name /product-name/ /pages/terms-privacy /pages/frontpage /products/product-name /shop/products/product-name
Intermediate & Advanced SEO | | mounayoga0 -
Is it possible to avoid redirect of penalties for 301 forwards?
We have been doing a good amount of competitive research lately and have noticed sites that have been changing their TTLD quite often to escape manual penalties / DCMA filings. An example evolution: brandterm.com -> brandterm.bz -> brandterm.me These competitors are able to quickly rank for money keywords in the top 3 soon after another domain switch. What we have noticed is that while its obvious they received Google penalties they continue to 301 redirect the old domains to the new ones. We have experienced first hand that penalties travel along domains with 301 redirects. Does anyone have an explanation how these companies are able to achieve quickly high volume of organic search while 301-redirecting from burnt domains? The only option I see is to disavow all previous domains in GWT to be able to employ 301 redirects without risking carrying over the penalty. Are there other theories ppl can think of? T
Intermediate & Advanced SEO | | petersocapro0 -
301 Redirecting Multiple Domains
I have several complete websites with blogs setup for different geo locations and was considering forwarding them all to one domain directly would greatly benefit ranking. The blogs are all linked together and that is where most of the links come from. Would I benefit in 301 Redirecting the domains?
Intermediate & Advanced SEO | | WindshieldGuy-2762210 -
303 redirect
Hi, 303 redirect is a good thing or not ? I have a homepage in 2 languages FR and EN > mywebsite.com/fr/ and mywebsite.com/en/. A 303 redirect is on mywebsite.com to mywebsite.com/fr/. Thanks D.
Intermediate & Advanced SEO | | android_lyon0 -
301 Redirect to a new domain, Need linkbuilding ideas
Hi, I just 301 redirected my 3 year old domain to a new domain which was created yesterday. Now i want to start link building to my new domain. Should i start slowly by publishing 4-5 articles on article directories and a 1 press release a week? Can someone suggest me some ideas on how to handle a new domain. Will be waiting for replies.
Intermediate & Advanced SEO | | Dex3783783780 -
How do i redirect www.domain.com/ to www.domain.com/index.php
I keep getting in my analytics www.domain.com/ and www.domain.com/index.php how do i make it consistently redirect to one version and not to both. I know about htaccess redirect and am already using this so am puzzle to which is the best one to use. below is the example .htaccess file im using. Options +FollowSymlinks
Intermediate & Advanced SEO | | mattmillen
RewriteEngine on
rewritecond %{http_host} ^domain.co.uk [nc]
rewriterule ^(.*)$ http://www.domain.co.uk/index.php$1 [r=301,nc] which is better for SEO should i forward to www.domain.com/ or www.domain.com/index.php0 -
Questions about 301 Redirects
I have about 10 - 15 URLs that are redirecting to http://www.domainname.comwww.domainname.com/. (which is an invalid URL)The website is on a Joomla platform. Does anyone know how I can fix this? I can't figure out where the problem is coming from.
Intermediate & Advanced SEO | | JohnParker27920