How To Use Intelligencia.UrlRewriter

Nov 19, 2010

I'm trying to use theIntelligencia.UrlRewriter that Scott Gu wrote about and another guy located ehere: [URL] Some info about my app: I have a master page with a menu populated via dataset. Users add pages to the site and store them in the database. One table for the page and another for the content. When the user selects a page in the menu control I redirect them to the default.aspx page which is a child of the masterpage. This works great.

Protected Sub Menu1_MenuItemClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.MenuEventArgs) Handles Menu1.MenuItemClick
Response.Redirect("default.aspx?PageName=" + HttpUtility.UrlEncode(Menu1.SelectedItem.Text))
End Sub

On the Default.aspx page I get the page content with this:

Protected sub Page_Load(ByVal sender
As
Object,
ByVal e
As System.EventArgs)
Handles
Me.LoadIf
Not IsPostBack
Then
Try
If
Me.Request.QueryString("PageName") <>
Nothing
Then
divContent.InnerHtml = PageContent.Get_PageContentData(PageName)
GetControls(PageName)
Dim PageName
As
String = HttpUtility.UrlDecode(Request.QueryString("PageName"))Dim
PageContent As
New PagesElse
divContent.InnerHtml = PageContent.Get_PageContentData(
GetControls(
Dim PageContent
As
New Pages"Home")"Home")End
If
Catch ex
As ExceptionEnd
Try
End
If
End
Sub

EVERYTHING works with this except I'm left with a URL like this: [URL] I would like it to look like this:[URL] But only after I get the page content populate the page! How would I use the Intelligencia.UrlRewriter in this situation?

View 1 Replies


Similar Messages:

Intelligencia.UrlRewriter - Using Port Other Than 80?

Jan 20, 2011

Does anyone know if it is possible to configure Intelligencia.UrlRewriter to work when accessing a site via a port other than 80?[URL]

View 1 Replies

Intelligencia.UrlRewriter - Session State

Aug 30, 2010

I have implemented a URL rewriting(extensionless) using Intelligencia.UrlRewriter, it works perfectly on my PC but on the server I am getting the following error Session state can only be used when enableSessionState is set to true, either in a configuration file or in the Page directive. also make sure that System.Web.SessionStateModule or a custom session state module is included in the <configuration><system.web><httpModules> section in the application configuration. this is my web.config file

<?xml version="1.0"?>
<configuration>
<configSections>
<section name="rewriter" requirePermission="false"
type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
</sectionGroup>
</sectionGroup>
</sectionGroup>
</configSections>
<appSettings>
</appSettings>
<system.web>
<!--

Set compilation debug="true" to insert debugging symbols into the compiled page. Because this affects performance, set this value to true only during development.

-->
<compilation debug="true">
<assemblies>
<add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Extensions.Design, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Web.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
<add assembly="System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies>
</compilation>
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="en-GB"/>
<!--

The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user.

-->
<authentication mode="Forms">
<forms loginUrl="/Admin/Login.aspx" name="FormAuthentication"></forms>
</authentication>
<authorization>
<deny users="?"/>
</authorization>
<!--

The <customErrors> section enables configuration of what to do if/when an unhandled error occurs during the execution of a request. Specifically, it enables developers to configure html error pages to be displayed in place of a error stack trace.

<customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
<error statusCode="403" redirect="admin/Error.aspx" />
<error statusCode="404" redirect="admin/Error.aspx" />
</customErrors>-->
<pages>
<controls>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add tagPrefix="asp" namespace="System.Web.UI.DataVisualization.Charting" assembly="System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>
<httpHandlers>
<add path="ChartImg.axd" verb="GET,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
<remove verb="*" path="*.asmx"/>
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/>
</httpHandlers>
<httpModules>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule, Intelligencia.UrlRewriter"/>
<add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</httpModules>
</system.web>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<providerOption name="CompilerVersion" value="v3.5"/>
<providerOption name="WarnAsError" value="false"/>
</compiler>
</compilers>
</system.codedom>
<!--

The system.webServer section is required for running ASP.NET AJAX under Internet Information Services 7.0. It is not necessary for previous version of IIS.

-->
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ScriptModule"/>
<add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="UrlRewriter" type="Intelligencia.UrlRewriter.RewriterHttpModule" />
</modules>
<handlers>
<add name="ChartImageHandler" preCondition="integratedMode" verb="GET,HEAD" path="ChartImg.axd" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<remove name="WebServiceHandlerFactory-Integrated"/>
<remove name="ScriptHandlerFactory"/>
<remove name="ScriptHandlerFactoryAppServices"/>
<remove name="ScriptResource"/>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</handlers>
</system.webServer>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" appliesTo="v2.0.50727"><dependentAssembly>
<assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
</dependentAssembly>
</assemblyBinding></runtime>
<rewriter>
<rewrite url="~/([0-9]*)/.*" to="~/custompage.aspx?Id=$1" />
</rewriter>
</configuration>
this is the error's stack trace

[HttpException (0x80004005): 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 <configuration><system.web><httpModules> section in the application configuration.]

System.Web.UI.Page.get_Session() +2647836
System.Web.UI.UserControl.get_Session() +17
MmmarvellousWebSite.userControls.WebSite.VerticalMenu.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsGiga GigaprMy DocumentsVisual Studio 2010ProjectsMmmarvellousWebSiteMmmarvellousWebSiteuserControlsWebSiteVerticalMenu.ascx.cs:10
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +99
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

View 2 Replies

Configuration :: Intelligencia.UrlRewriter Doesn't Works On Hosting Server

Apr 8, 2010

I have made a Website in Vs2008 on XP.Did the Url rewriting for this website by using Intelligencia.UrlRewriter.dll.It works fine locally.in my webconfing i did it like this ->

<rewriter>
<rewrite url="~/MstDealer/(.+).aspx" to="~/MstDealer.aspx?nTableKey=$1"/> <rewriter>

View 9 Replies

Configuration :: Intelligencia.UrlRewriter Not Working On Production Server IIS6

Apr 27, 2010

i am using Intelligencia.UrlRewriter on my website and it works fine on my development machine, i tryed to deploy on IIS6 and i get this error:

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.Please try the following: Make sure that the Web site address displayed in the address bar of your browser is spelled and formatted correctly. If you reached this page by clicking a link, contact the Web site administrator to alert them that the link is incorrectly formatted. Click the Back button to try another link. HTTP Error 404 - File or directory not found.

Internet Information Services (IIS)
Technical Information (for support personnel)

Go to Microsoft Product Support Services and perform a title search for the words HTTP and 404. Open IIS Help, which is accessible in IIS Manager (inetmgr), and search for topics titled Web Site Setup, Common Administrative Tasks, and About Custom Error Messages. this is the url that throws the error. [URL] this is the working url that is being rewriten to the above one. [URL]

View 2 Replies

Web Forms :: Using Intelligencia.UrlRewrite In Code?

Jun 4, 2010

I'm using Intelligencia.UrlRewrite in my code, I'm creating an e-commerce website. On the localhost all works well. This is how it works on the localhost "http://localhost/eish2o/Reverse-Osmosis-with-booster-pump-p116/" When the add to cart button is pressed it changes to "http://localhost/eish2o/Product.aspx?ProductID=116". On the server it changes to, "http://localhost/eish2o/Reverse-Osmosis-with-booster-pump-p116/ProductID=116" and then gives an error The page cannot be found. It is all the same code.

View 5 Replies

Not Showing Images After Using Intelligencia URL Rewriter?

Nov 10, 2010

I am using the ajax slideshow which retrives an Image URL from my database table/ It works fine but as soon as I started using the Intelligencia.UrlRewriter, images are not showing. all my code is below.

Code Behind
private static DataTable tblData = new DataTable();
string sName = Request.QueryString["Id"];
<query string param is UserId>
string strSQL = "SELECT [ImageUrl],[FirstName], [LastName] FROM [Images] WHERE ([FootballerId] = @FootballerId)";
SqlConnection conn = new SqlConnection("Data Source=xxxxxxxxxxxxxxxxxx");
conn.Open();
SqlCommand comm = new SqlCommand(strSQL, conn);
comm.Parameters.Add("@FootballerId", SqlDbType.NVarChar).Value = sName;
SqlDataAdapter da = new SqlDataAdapter(comm);
tblData = new DataTable();
da.Fill(tblData);
conn.Close();
// set the initial image
if (tblData.Rows.Count > 0)
{
imgShowImage.ImageUrl = tblData.Rows[0]["ImageUrl"].ToString();
imageLabel1.Text = tblData.Rows[0]["FirstName"].ToString();
}
}
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[tblData.Rows.Count];
for (int i = 0; i < tblData.Rows.Count; i++)
{
DataRow dr = tblData.Rows[i];
slides[i] = new AjaxControlToolkit.Slide(
dr["ImageUrl"].ToString(),
dr["FirstName"].ToString(),
dr["LastName"].ToString());
}
return slides;
}
ASPX
<cc1:SlideShowExtender
ID="slideshowextend1"
TargetControlID="imgShowImage"
SlideShowServiceMethod="GetSlides"
AutoPlay="true"
ImageDescriptionLabelID="imageLabel1"
NextButtonID="nextButton"
PlayButtonText="Play"
StopButtonText="Stop"
PreviousButtonID="prevButton"
PlayButtonID="playButton"
Loop="true"
runat="server"
Enabled="True">
</cc1:SlideShowExtender>
<div
class="GridRight">
<asp:Image
ID="imgShowImage"
runat="server"
Height="300px"
ImageAlign="Middle"
/>
</div>
SQL Database Path
/Footballer/sandra//Horses.jpg
Web Config
<rewriter>
<rewrite url="~/Sandra" to="~/CMC/PublicProfile.aspx?Id=dff12c6b-e37c-4591-97ae-a65c27c1de1d"/>
</rewriter>
rewriter>
 
<

View 2 Replies

Intelligencia URL ReWriter Mapping With Regex

Mar 25, 2010

I am using the Intelligencia URL rewriter in my asp.net web application. I use the web.config mappings I'm trying to map the following url:

[URL] To: [URL]

obviously in the above example, xxx is replaced from the "productId" from the "friendly" url. In my web.config, I've got so far:

<rewrite url="~/contract-deals/([w-_]+)/_(.+).aspx" to="~/ProductInfo.aspx?productId=$1"/>

This isn't working however. I need the correct regex to use for my requirements (regex really isn't my strong point!!)

View 1 Replies

Not Showing Image After URL Rewriting By Intelligencia

Dec 5, 2010

I am using Intelligencia for url rewirting. My problem is after url rewirting images and scripts lost becuase its urls changes.

<rewrite url="~/Pages/(.+).html" to="~/Default.aspx?PageId=$1"/>

if i remove pages from pattern it work correctly(like below)

<rewrite url="~/(.+).html" to="~/Default.aspx?PageId=$1"/>

View 2 Replies

Url Rewriting With Intelligencia Rule Not Working

Mar 17, 2011

Im using Intelligencia UrlRewriter for url rewriting. I have wrote a set of rules in the web.config file I have two sets pages, Static pages whose name is static but content is CMS based Dynamic pages (actually this is not simply a dynamic page its a category which have description and sub categories) Here both pages are being rewritten from the config file. For instance home page, about us page etc tis is being rewritten as

rewrite url="~/Home" to="~/Default.aspx"

The category page is being the same kind of url its being rewritten as

rewrite url="~/(.*)" to="~/GroupHome.aspx?Group=$1"

I have given the rules for the static pages first and then the category url but all the urls are being rewritten to grouphome, even if I have given the rule for home page, about us page etc before the category rule. I have tried even the ollowing still its directing to Group home,

<rewrite url="~/Home" to="~/Default.aspx"/>
<rewrite url="~/(.*)/" to="~/GroupHome.aspx?Group=$1"/>
<rewrite url="~/Home" to="~/Default.aspx"/>

How the rule can be rewritten to include both urls

View 1 Replies

AJAX :: Slideshow Images Won't Display / Intelligencia URL Rewriter?

Nov 11, 2010

on another post i mentioned the problem but simplified it here! I am using ajax slideshow extender and getting images from my database
Datbase table file path example

/ ImageURL
/Members/matt//jeanette4.jpg
Code Behind
//here i open sql connection to database and retrieve images based on GUID of UserId which i add as sql parameter.//
// set the initial image
if (tblData.Rows.Count > 0)
{
imgShowImage.ImageUrl =tblData.Rows[0]["ImageUrl"].ToString();
imageLabel1.Text = tblData.Rows[0]["FirstName"].ToString();
}
}
}
[System.Web.Services.WebMethod]
[System.Web.Script.Services.ScriptMethod]
public static AjaxControlToolkit.Slide[] GetSlides()
{
AjaxControlToolkit.Slide[] slides = new AjaxControlToolkit.Slide[tblData.Rows.Count];
for (int i = 0; i < tblData.Rows.Count; i++)
{
DataRow dr = tblData.Rows[i];
slides[i] = new AjaxControlToolkit.Slide(
dr["ImageUrl"].ToString(),
dr["FirstName"].ToString(),
dr["LastName"].ToString());
}
return slides;
}
ASPX
Page shows the image
<asp:Image ID="imgShowImage" runat="server"
Height="300px" ImageAlign="Middle" />

This all works fine/ but when i set up the web config with Intelligencia.UrlRewriter code the slideshow images do not appear but the page gets divirted correctly

<rewriter>
<rewrite url="~/Matt" to="~/MembersClub/PublicProfile.aspx?Id=a8742959-aa5e-4830-9fc1-94f1b3d0bc41"/>
</rewriter>

The images are stored in a file directory named "Members".

View 1 Replies

How To Debug UrlRewriter.NET

Mar 12, 2010

can i register a debug logger that outputs information to the 'standard ASP.NET debug window'. My problem is I don't know what that means, if it means the debug output window in Visual Studio (where you see build output, debug output and more) I am not seeing any UrlRewriter debug output. The rules are working (mostly) I just want to get more debug output to fix issues. I added the register call to the rewriter section like this:

<rewriter>
<register logger="Intelligencia.UrlRewriter.Logging.DebugLogger, Intelligencia.UrlRewriter" />
....
</rewriter>

I am hosting this website locally in IIS on Vista, to debug it I attach the debugger to the w3wp process. Other selected parts from the web.config"

<compilation debug="true">
<assemblies>
...
</assemblies>
</compilation>
<trace enabled="true"/>

Where should I see the debug output from UrlRewriter.NET? If it is in the Visual Studio debug output window, any ideas why I am not seeing it there?

View 2 Replies

Web Forms :: UrlRewriter Rules?

Jul 25, 2010

UrlRewriter rules?[URL]I need a rule for a user how is visiting my web like this URL
]ProductName=[ProductName]

View 1 Replies

Urlrewriter Page Not Executed?

May 3, 2010

I'm having some problems with the module urlrewriter.net for ASP.NET.I have a multilingual site with a URL like this;

~/home.aspx
To support languages I use this rewrite rule;
<rewrite url="~/de-DE/(.*)" to="~/$1"></rewrite>

Then in my code I get the de-DE part and set the right culture for the current thread. All of this works well.After I login on the website I get a message "Hello, user x" to show i'm logged in. When navigating to another page, it doesn't display this message anymore and it seems like the page comes from the cache or something with the old (not logged in) data. Also, when I attach the debugger, nothing is executed for this request. If I visit the page like ~/home.aspx instead of ~/de-DE/home.aspx, does problem does not occur.

View 1 Replies

Regular Expression On The URLRewriter?

Oct 27, 2010

I have the following:

[Code]....

Now the (.+) will not load up the page and throw an error if I have a + in the query string. what can I do?

View 7 Replies

Web Forms :: UrlRewriter.net And ReturnUrl?

May 28, 2010

I am writing an application with UrlRewriter.net and I would like it to be able to redirect from login pages to ReturnUrl's.

What I would like to do is something on the lines of http://www.website.com/loginpage/[EncodedURL] but when I try it, it says "Bad Request".]

View 2 Replies

UrlRewriter - Prevent Rules For Subdirectories?

Nov 3, 2010

I'm using UrlRewriter.net, mentioned on ScottGu's Blog. I've built a site around this and now I'm having problems with subdirectories. The problem is, I want to exclude a directory and all subdirectories/files within it from rewriting. The rules I have are:

<rewrite url="~/(.*)/Uploads/Images/(.+)?" to="~/Uploads/Images/$2" processing="stop" />
<rewrite url="~/(.*)/Uploads/(.+)/(.+)?" to="~/Uploads/$2/$3" processing="stop" />
<rewrite url="~/(.*)/Uploads/(.+)?" to="~/Uploads/$2" />

The problem is, although I can access files in the uploads directory (/Uploads/myfile.ext) and see the directory lists for direct subdirectories (/Uploads/mySubdirectory/), anything in /Uploads/mySubdirectory/, eg: /Uploads/mySubdirectory/myfile.ext returns a 404, because the UrlRewriter is messing with the Urls. I've tried these rules in different orders to no avail.Has anyone used this before? There must be a way to get it to work.

View 1 Replies

Why URLRewriter Doesn't Get Querystring Values

Jul 27, 2010

I just started using URLRewriter.net with my blog and I have a problem with getting the query string values. I have a rule setting like:

<rewrite url="~/blog.aspx(?.+)?$"
to="~/hiddenFolder/blog.aspx?mode=default&$2"/>

But when I try to access /blog.aspx?page=1 the page parameter is not passed. Other parameters work great and there are no conflicts in rewriting rules.

View 1 Replies

Default Document On GoDaddy When Using UrlRewriter?

Mar 31, 2010

I've got an Asp.net site set up on GoDaddy which is using UrlRewriter.net (not to be confused with UrlRewriting.net) to enable url rewriting which seems to be working ok, though I had to set IIS to run in IIS6 mode, rather than IIS7. The problem I have is that my default document is 'virtual' so while it's possible to browse to mydomain.com/default.aspx just going to mydomain.com/ doesn't work - I presume this is because IIS is expecting default.aspx to actually exist within the root directory of the website. Is there any way around this problem?EditAs requested, here is the rewrite rule from my web.config file.

<rewriter>
<rewrite url="^(/.+(.gif|.png|.jpg|.ico|.pdf|.css|.js)(?.+)?)$" to="$1" processing="stop" />
<unless url="~/Login.aspx|~/Page-Not-Found.aspx|~/ShowPage.aspx">
<rewrite url="^~/(.+).aspx" to="/ShowPage.aspx?PageName=$1" />
</unless>
</rewriter>

View 1 Replies

UrlRewriter - How To Write RegEx For Root

Oct 22, 2010

I have been trying to use UrlRewriter (Intelligencia.UrlRewriter.dll) in a test project. My rewrite statement is as in the following:

<rewrite url="~/Sample/(.+)" to="~/Sample.aspx?Test=$1"/>

This statement works great for a URL like: [URL] or, let's say: [URL] And, I can retrieve the value "12345" in Sample.aspx file as: Label1.Text = "Test: " + Request.QueryString["Test"];

And when I hit the root link, it successfully displays the Default.aspx: [URL] What I want to accomplish is taking the "Sample" off the regex statement, so that I can directly hit [URL] and display Sample.aspx by retrieving "12345" value. And, when the root is hit [URL] it will simply display Default.aspx as it is now. Is it possible? Can the regex statement be updated to something else for this purpose?

View 2 Replies

Using URL Redirection Based On Domain Name Using UrlRewritingNet.UrlRewriter?

Oct 5, 2010

I want to redirect a request in an asp.net web site based on the domain, my scenario is like this.I have the app setup so that it will process the requests from multiple domains like from www.abc.com and www.xyz.com, now i want that when ever a request comes to the www.abc.com/default.aspx the url would be rewrites to the www.abc.com/custom/abcdefault.aspx while for all the other requests like for www.xyz.com/default.aspx it should do nothing.

View 1 Replies

URLRewriter.net - Change A Query String Into A Sub-domain Name?

Dec 17, 2010

I am trying to do the following:

making "website.com/default.aspx?Name=John" look as "john.website.com"

Just with URL Rewrite, I don't want to have an actual sub domain, how can I achieve this?

View 1 Replies

Url Rewriting - Urlrewriter Work On Web Server But Not On IIS 6 Shared Hosting?

Apr 25, 2010

anyone know how to "make work" urlrewriter.net component on IIS 6 ?
Actually i have this web.config section :

<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler, Intelligencia.UrlRewriter" />
And the rule is, for example:
<rewrite url="~/tag/(.+)" to="~/default.aspx?tag=$1" />

It's work on the ASP.NET Developmnet server, but not when i go to my shared hosting web site !!! :(

View 1 Replies

Intellegencia Urlrewriter Is Not Working Showing 404 Page Not Found?

Feb 10, 2011

These are some extracts from my web.config file on development server. Intelligencia URL was fine but when deployed on production(IIS 5 on both servers) it returns page not found(404 error) on every rewritten url except for one which has ~/(guid value).aspx/value (rewriiten url) working

<section name="rewriter" requirePermission="false" type="Intelligencia.UrlRewriter.Configuration.RewriterConfigurationSectionHandler,

[code]...

View 2 Replies

Visual Studio :: Added UrlRewriter.Net To Application Not Postbacks?

Jan 16, 2010

I have recently added UrlRewriter.Net to my application. Because I was having problems with postbacks, I added the following to my Master Page:

[code]...

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved