Rewrite and redirect rules using codebehind, DOT NET Programming Rewrite and Redirect Rules using CodeBehind

Project Description:

Need 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, 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 ( 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: rewritten to 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

Posted Date: 1/25/2014 2:26:12 AM | Location : United States

Related Discussions:- Rewrite and redirect rules using codebehind, Assignment Help, Ask Question on Rewrite and redirect rules using codebehind, Get Answer, Expert's Help, Rewrite and redirect rules using codebehind Discussions

Write discussion on Rewrite and redirect rules using codebehind
Your posts are moderated
Related Questions
ASP.NET/MSSQL/ MVC completing backend solution + integrating with frontend. Project Description: System is used for tracking company's activities through several projects by

What is an application domain? Previously "PROCESS" were used as the security boundaries. One of the process has its own virtual memory and does not overlap the  another proces

Write the basic syntax of a LINQ query in Visual Basic as well as in C#. In Visual Basic, the basic syntax of a LINQ query begins with the from clause and ends with the Select

What are LINQ query expressions? A LINQ query, also known as a query expression, having of a combination of query clauses that identify the data sources for the query. It conta

In this assignment you will create a Windows application that mimic the ILDASM application. Your application should have at least the following features: 1. A multi-form applica

We need in ASP.NET Mvc site I have project should be done with MVC.NET technology. In general- I have by now the site Layout (Html-js-css) I need- a) Simple CMS allo

Project Description: i want to prepare a pollution checking software.. i have a demo of it.. Exactly someone to be created ..some changes to be included.. sms gateway t

What is ASP.NET Authentication Providers and IIS Security? ASP.NET executes authentication using authentication providers, which are code modules that determine credentials and

What is PLINQ? PLINQ stands for Parallel Language Integrated Query. It is the parallel execution of LINQ, in which a query can be implemented by using multiple processors. PLIN

Explain ADO.NET in brief. ADO.NET is a very significant feature of .NET Framework, which is used to work with data that is stored in structured data sources, like databases and