How can you redirect a URL with the file extenstion from an .aspx site in a node.js + express project?
-
I have an existing site with the URL of http://www.bruxzir.com/video-bruxzir-zirconia-dental-crown/index.aspx but if someone follows that old link, they need to be redirected to the new link of http://www.bruxzir.com/video-bruxzir-zirconia-dental-crown/ Basically I need to rewrite the request to strip out the index.aspx if that is requested. This new site will be deployed as a node.js site to Heroku. (optional) Also interested in knowing how this might affect our SEO.
-
Answer:
I would recommend using http://nginx.com/ for it. From my personal experience, it is always better to not expose node.js endpoints directly but have them routed through some module designed specifically for it. It may take you some 15 .. 30 minutes to figure out how to configure nginx redirect (and another 15 .. 30 minutes to figure out what nginx is if you have not used it), yet the end result will be worth it: the problem will be solved and you will not have to think of it again. Also, check in the resulting nginx config (the sites-enabled/X file) along with your node.js code into the source control. It will help later as well.
Dima Korolev at Quora Visit the source
Related Q & A:
- How can I redirect www to non www site?Best solution by Server Fault
- How can I do a resource in PDF file?Best solution by Stack Overflow
- how to browserify a node-js module?Best solution by Stack Overflow
- How can you do a visual project on perception?Best solution by Yahoo! Answers
- How can I make a good clay for a school project?Best solution by answers.yahoo.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.