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

  • Home
  • SEARCH
  • 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 6946827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:36:56+00:00 2026-05-27T13:36:56+00:00

I’m trying to play around with URL rewrites and can’t get it to work.

  • 0

I’m trying to play around with URL rewrites and can’t get it to work.

  1. I have a URL, http://localhost/CToastWebsite/Rooms.aspx and want to write it as http://localhost/CToastWebsite/Rooms

  2. And I have another URL, http://localhost/CToastWebsite/Rooms.aspx?type=CreateRoom and want to write it http://localhost/CToastWebsite/Rooms/CreateRoom.

How would I go about doing this?

I have tried and my CSS and images do not work even though I use /styles/styles.css with URL http://localhost/CToastWebsite/Rooms.aspx/CreateRooms. Is this the correct way of using a URL like this?

I’m stuck, and I have searched for articles, but I can’t find anything that is easy to follow and get the CSS and images to work.

EDIT

I have set up urlrewritingnet.net, but I am having problems. I set a rule such as:

<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >
<rewrites>

  <add name="Rewrite"  virtualUrl="^~/Rooms"
       rewriteUrlParameter="ExcludeFromClientQueryString"
       destinationUrl="~/Rooms.aspx"
       ignoreCase="true" />

</rewrites>

</urlrewritingnet>

So I want /rooms.aspx to change to /rooms, but the page keeps displaying /rooms.aspx.

Session state error now

Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. Please also make sure that System.Web.SessionStateModule or a custom session state module is included in the \\ section in the application configuration.

I have added the tag in the web.config file in <system.web>:

<sessionState mode="InProc" timeout="20" cookieless="UseCookies" />

and I have set EnableSessionState="true" in the page directive.

Solution

I followed Stack Overflow question Error using session in IIS 7 to make the session state work again.

  • 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-27T13:36:56+00:00Added an answer on May 27, 2026 at 1:36 pm

    I personally wouldn’t use a URL that had the entire page name, plus extension in it – although this makes the problem quite easy to solve (as I assume you are still requesting the original page), it, in my opinion, defeats the point of URL rewriting.

    There are plenty of URL rewriting implementations for .NET that are quite easy to configure and use.

    I use URL Rewriting.Net

    You can use a tool to see where your requests are going. A popular one for Internet Explorer is IE HTTP Headers – this is often useful for seeing where the browser is being redirected too. This should help you determine where the requests are going for your CSS and images.

    Scott Hanselman also has a post about how to do this in IIS 7.

    There are also plenty of examples on Stack Overflow – look at the Related links in the bottom right hand corner for examples.

    You might also want to post some example of code of how are doing your rewrites at the moment if you want to work out what is going wrong.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am trying to loop through a bunch of documents I have to put
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.