Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DOT NET Expert

VB.net Rewrite and Redirect Rules using CodeBehind

Project Description:

Need VB.net programmer to make some (hopefully) minor code edits to resolve some site issues. I will provide the CodeBehind (.aspx.vb) files and the Main.master.vb file. All edits have to be made in these files. IIS rewrites and Server level are unfortunately not an option.

This can be a trial and error process to see if the changes work with the CMS and server. I am code-savvy but need expert guidance for these customizations.

About The Site and Server Environment

IIS 7.5 on Windows Server 2008 R2

Custom CMS using VB.net, MasterPages, CodeBehind

Current Issues

1. Whenever a user visits a non-existent page ending in .aspx, they are masked-redirected to the default page, which is the site home page. All other missing pages/ non-existent return the correct 404 page. I need the missing .aspx pages to return a 404 error.

The way the redirect code is set up is this:

If ThePage Is Nothing Then

ThePage = FindDefault

End If

The major issue is that when this code is replaced, the home page root (http://www.mysite.com/) returns a 404 error because it falls under the "If ThePage Is Nothing Then" statement. I need an exception for the home page so it does not give a 404 error. Expectantly this can be resolved with a few lines of code. :)

2. Force lowercase urls site wide and on all sub-directories EXCEPT for admin folder.

This can be done in IIS but it breaks some functionality in the/admin /directory. I need an exception for the /admin/ directory.

3. Rewrite underscores to dashes in all urls and redirect old urls to new ones

Existing site CMS inserts underscores in URLs. I require these rewritten to dashes and all URLs using the underscores to be 301 redirected to the new links.

Exclude /admin/ directory

Example:

http://www.mysite.com/sample_link.aspx rewritten to http://www.mysite.com/sample-link.aspx but if someone visits the old link (sample1_link.aspx), they are 301 redirected to the updated one (sample2-link.aspx)

An IIS rewrite rule MIGHT work for this. Must be done from IIS Manager.

4. I require to drop the .aspx from all URLs and force a trailing slash on the newly rewritten URLs. All old links should redirected by 301 redirect to new links.

Skills required:

.NET, ASP, Visual Basic, IIS, Windows Server

DOT NET, Programming

  • Category:- DOT NET
  • Reference No.:- M9591777

Have any Question?


Related Questions in DOT NET

Casewe sell pdfs from our site and pdfs can be ordered from

Case We sell pdf''s from our site and pdfs can be ordered from the site by selecting a book, putting it in a shopping cart, then signing in with a password or as a guest, and then checking out. For some reason, when a pu ...

Assignment specificationthis assignment is split into two

ASSIGNMENT SPECIFICATION This assignment is split into two documents. 1. Assignment Specification. This document contains the specification for what you will be required to do. 2. Assignment Addendum. This document conta ...

Scenariouser modelling inc would like to organize a series

Scenario User Modelling Inc. would like to organize a series of conferences focusing on research topics in the area of user adaptive systems and personalization. They need to organize annual conferences for researchers a ...

Summarythis assessment requires you to develop a simple

Summary This assessment requires you to develop a simple text editor with a basic offline user login. It is a windows application that will allow new uses to be added, existing users to login, and to create/save/edit tex ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As