Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7030993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:44:40+00:00 2026-05-28T00:44:40+00:00

I’ve googled everything, and I’ve read a ton of different responses — some I’ve

  • 0

I’ve googled everything, and I’ve read a ton of different responses — some I’ve tried to implicate with no success. I’m not a professional programmer, but I thank people in this forum for teaching me so much about everything, from jquery to doctypes, to you name it!

I have a website developed in VWD 2010 Express. I just want to know 2 things:

  1. I know it’s bad for search engines/duplicate content to have yourdomain and http://www.yourdomain both, so I want to set up a 301 redirect so that if an end-user types in mydomain, they’re automatically redirected to http://www.mydomain (with the www).

  2. I’ve moved some pages that aren’t in the root, but in folders. So I want to replace the outdated page with the new location. I want to do this by automatically redirecting them from http://www.mydomain/services/engineering.aspx to http://www.mydomain/products/engineering.aspx.

Is this difficult? Is it (recommended) to use .htaccess, or web.config, or something else?

Thank you for your time in reading this, and I sincerely appreciate any and all feedback.

Jason Weber

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:44:41+00:00Added an answer on May 28, 2026 at 12:44 am

    Unless I’ve misunderstood .htacess is for Apache and if you are coding in ASP.Net you are almost certainly using IIS. So igonore the .htaccess stuff in your research.

    You could use some kind of URL Rewriter for your redirects but that can get very complex. If i were you I would keep it as simple as possible and do your old page 301 redirects in the Page_Load event i.e.

    protected void Page_Load(object sender, System.EventArgs e)
    {
       Response.Status = "301 Moved Permanently";
       Response.AddHeader("Location","http://www.domainname.com/new-page.aspx");
    }
    

    For your canonical redirect (non www to www) you could do similar in the Global.asax file in Application_BeginRequest to detect the non www variant i.e.

    if (HttpContext.Current.Request.Url.ToString().ToLower().Contains( 
        "http://mysite.com")) 
    { 
        HttpContext.Current.Response.Status = "301 Moved Permanently"; 
        HttpContext.Current.Response.AddHeader("Location", 
            Request.Url.ToString().ToLower().Replace( 
                "http://mysite.com", 
                "http://www.mysite.com")); 
    } 
    

    (this isn’t my code it came from here)

    This is what I would do anyway – it has the benefit of being easy to understand and keep you out of the way of any strange web server config which I find a bit of a black box sometimes.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I need a function that will clean a strings' special characters. I do NOT
string formIdList = 8256, 8258, 8362, 8120, 8270, 8271, 8272, 8273, 8257, 8279, 8212,
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I've tracked down a weird MySQL problem to the two different ways I was
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.