Wrox Programmer Forums
|
BOOK: Professional Search Engine Optimization with ASP.NET ISBN: 978-0-470-13147-3
This is the forum to discuss the Wrox book Professional Search Engine Optimization with ASP.NET: A Developer's Guide to SEO by Cristian Darie, Jaimie Sirovich; ISBN: 9780470131473
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Search Engine Optimization with ASP.NET ISBN: 978-0-470-13147-3 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 9th, 2009, 05:06 PM
Registered User
 
Join Date: Nov 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, after getting a long way in development i have decided to structure my application rather than using a flat based file structure...

I want to have a system like:
Sections
- Contact Us
- Email page

But i then want to have my url as www.mysite.com/Contact_Us.aspx

Having done this i have run into some issues in that i cannot reference my themes correctly...

When i view the source i get the path as it would be if i was viewing the page from the folder structure...

Does anyone know how i can get around this?

I tried including the following rewrite rule but it fails to help:

<rewrite url=".*/App_Themes/(.+)" to="~/App_Themes/$1" />

Thank you in advance for your help
 
Old February 9th, 2009, 07:32 PM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

This is a typical gotcha. What you can do is root reference all of your files:

Instead of styles.css (which is relative) use /styles.css

For ASP.NET controls use the ~ character:
<asp:image imageurl="~/images/logo.jpg" runat="server"/>

I realize you are trying to achieve this with a Rewrite rule but why make the module rewrite something that it doesn't absolutely have to?

hth.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================





Similar Threads
Thread Thread Starter Forum Replies Last Post
Working with the book on two machines... Bruce.Wiki BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 October 30th, 2008 11:53 AM
SQL In book not working bgcsocal SQL Server 2005 3 August 5th, 2008 12:54 PM
Code in Book Not Working kaaveryups SQL Server 2005 2 April 11th, 2007 01:29 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.