CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.classifieds_starter_kit Tags:
Item Type: NewsGroup Date Entered: 3/15/2007 9:23:19 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 9 Views: 50 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
10 Items, 1 Pages 1 |< << Go >> >|
robinwilliams
Asp.Net User
URL Re-Writing3/15/2007 9:23:19 AM

0/0

I have a bunch of categories on my classifieds site. When you go into a category such as building supplies then hammers it comes up as for example, www.domain-name.com/search.aspx?c=3   

I would like to make it. www.domain-name.com/building_supplies/hammers/cat3.aspx

I have seen one person do it at: http://www.pagineannunci.it/default.aspx

 

Any ideas on how to do this.

 

Cheers!

Rob 


 


Success comes to those who prepare well and put in effort.
Sohnee
Asp.Net User
Re: URL Re-Writing3/15/2007 11:09:33 AM

0/0

Firstly, believe me when I recommend the following slight change...

 www.domain-name.com/building_supplies/hammers_3_tools.aspx

Or something like that - essentially, it's easier not to go down the directory route if you want a fairly dynamic solution to rewriting - as, for example, all the images on www.domain-name.com/search.aspx?c=3   would work, but all the images on www.domain-name.com/building_supplies/hammers/cat3.aspx would fail because it would now be looking for /hammers/images/hammer3.gif rather than looking in the route. This is the case for all relative links in the site - so you can see what a pain it would be.

Other than that, take a look at this article by Scott Mitchell (4GuysFromRolla) http://msdn2.microsoft.com/en-us/library/ms972974.aspx

And maybe use a simple generic method of rewriting that works like this: (this is a messy example that gives you the idea) -

This saves having to have a rewrite rule for loads of different pages and stuff - you just split your url and off you go...

.

		public void Rewrite_BeginRequest (object sender, System.EventArgs args)
		{
			//process rules here
			//cast the sender to an HttpApplication object
			//http://localhost/Rewrite.Test/[NAMEOFPAGE]_[IDOFPRODUCT]_[DESCRIPTION].aspx
			System.Web.HttpApplication Appl = (System.Web.HttpApplication)sender;
			string[] urlArray = Appl.Request.Path.ToLower().Split('/');
			string[] path = urlArray[urlArray.Length - 1].Split('_');

			if (path.Length > 2)
			{
				string page = path[0];
				string id = path[1];
				string band = path[2];
				Appl.Context.RewritePath("~/" + page + ".aspx?id=" + id);
			}
		}
 

 

robinwilliams
Asp.Net User
Re: URL Re-Writing3/15/2007 11:12:39 PM

0/0

Sohnee Thanks for your reply. So where would I put that code? On my masterpage ?

 

Cheers!

Rob


Success comes to those who prepare well and put in effort.
robinwilliams
Asp.Net User
Re: URL Re-Writing3/15/2007 11:12:58 PM

0/0

Sohnee Thanks for your reply. So where would I put that code? On my masterpage ?

 

Cheers!

Rob


Success comes to those who prepare well and put in effort.
pagineguida
Asp.Net User
Re: URL Re-Writing3/16/2007 9:23:40 PM

0/0

For re-writing of  www.pagineannunci.it i use www.urlrewriting.net is  simple and free.
www.pagineannunci.it
robinwilliams
Asp.Net User
Re: URL Re-Writing3/16/2007 11:25:04 PM

0/0

Hi pagineguida,

Thanks for the link. I downloaded the UrlRewritingNet_20.zip file and read the PDF guide.

I am a little confused, would you mind giving me the web.config code, and other code that you used on www.pagineannunci.it?

 

Cheers!

Rob


Success comes to those who prepare well and put in effort.
Sohnee
Asp.Net User
Re: URL Re-Writing3/19/2007 1:52:48 PM

0/0

>  "Sohnee Thanks for your reply. So where would I put that code? On my masterpage ?"

You can either pop it in a class file, or in a separate project so you can re-use it...

 

ravivb.net
Asp.Net User
Re: URL Re-Writing3/23/2007 3:53:17 AM

0/0

This is a very good example at  www.pagineannunci.it with URL Rewriting

 I would like to do something similar with my domain www.insideap.com.

In addition to this, i would like to know if i could add location in the url and drive the site based on location.

has any one done this?


blog.budigelli.com
robinwilliams
Asp.Net User
Re: URL Re-Writing3/26/2007 10:25:23 AM

0/0

In the above post he said he uses www.urlrewriting.net 

 
I downloaded the Zip file and it's a .dll file you put in your BLL folder or something I think (Same as Ajax toolkit)


I looked at the quickstart guide, it doesn't make a lot of sense.

 

If any one works it out, can you PLEASE TELL us how you did it!! (In super simple english please!!!)  Smile

 

This could be a major break through, it looks better than something like,  www.domain-name.com/default.aspx?id=3  


Success comes to those who prepare well and put in effort.
pagineguida
Asp.Net User
Re: URL Re-Writing3/29/2007 10:46:09 PM

0/0

Re-writing need (sample http://www.pagineannunci.it/immobili/cat26.aspx ):
1) Place .dll in bin directory
2) Modify web.config similar too:
<configSections>
    <section name="urlrewritingnet" 
             requirePermission ="false"
             type="UrlRewritingNet.Configuration.UrlRewriteSection, UrlRewritingNet.UrlRewriter"  />
  </configSections>

  <urlrewritingnet
    rewriteOnlyVirtualUrls="true"  
    contextItemsPrefix="QueryString"
    defaultPage = "default.aspx"
    defaultProvider="RegEx"
    xmlns="http://www.urlrewriting.net/schemas/config/2006/07" >
    <rewrites>
      <add name="uno"  virtualUrl="^http\://(.*)/(.*)/cat(.*).aspx"           
           rewriteUrlParameter="ExcludeFromClientQueryString"
           destinationUrl="~/Search.aspx?c=$3&amp;NomeCat=$2"
           rewrite="Domain"
           ignoreCase="true" />
      
    </rewrites>   
  </urlrewritingnet>


www.pagineannunci.it
10 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Java Servlet Programming Authors: Jason Hunter, William Crawford, Pages: 753, Published: 2001
Java Servlet and JSP Cookbook: Practical Solutions to Real-world Problems Authors: Bruce W. Perry, Pages: 723, Published: 2004
Beginning PHP and MySQL: From Novice to Professional Authors: W. Jason Gilmore, Pages: 1044, Published: 2008
Beginning PHP and MySQL 5: From Novice to Professional Authors: W. Jason Gilmore, Pages: 913, Published: 2006
Professional LAMP: Linux, Apache, MySQL, and PHP Web Development Authors: Jason Gerner, Elizabeth Naramore, Morgan Owens, Matt Warden, Pages: 379, Published: 2005
Head First Servlets and JSP: Passing the Sun Certified Web Component Developer Exam Authors: Bryan Basham, Kathy Sierra, Bert Bates, Pages: 879, Published: 2008
Learning Java: Covers Java 1.4. Authors: Patrick Niemeyer, Jonathan Knudsen, Pages: 807, Published: 2002
Professional Search Engine Optimization with PHP: A Developer's Guide to SEO Authors: Jaimie Sirovich, Cristian Darie, Pages: 360, Published: 2007
The Definitive Guide to Symfony Authors: Francois Zaninotto, Fabien Potencier, Pages: 486, Published: 2007
Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to J2EE Solutions Authors: Budi Kurniawan, Pages: 953, Published: 2002

Web:
Rewrite engine - Wikipedia, the free encyclopedia In Java, the term "URL rewriting" sometimes describes a Web Application ... Recent generations of web frameworks usually include URL rewriting: Ruby on ...
URL Rewriting Guide - Apache HTTP Server A typical FAQ about URL rewriting is how to redirect failing requests on webserver A to webserver B. Usually this is done via ErrorDocument CGI-scripts in ...
URL Rewriting in ASP.NET Summary: Examines how to perform dynamic URL rewriting with Microsoft ASP.NET. URL rewriting is the process of intercepting an incoming Web request and ...
URL Rewriting | redirecting URLs with Apache’s mod_rewrite ... Feb 12, 2008 ... Beginner's guide to using Apache's mod_rewrite. Includes why redirects are necessary, basic use, and regular expressions.
URL Rewriting - SEO Tools - Search Engine Optimization, Google ... URL Rewriting - Static URLs are known to be better than Dynamic URLs.
URL Rewriting - Create Search Engine Friendly URLs URL rewriting of this type would work ONLY if you are hosted on a Linux Server. Dynamic URLs vs. Static URLs. This article explains the various challenges ...
Apache.org: Module mod_rewrite URL Rewriting Engine Rewrites the requested URL on-the-fly based on configuration directives and rules.
mod_rewrite: A Beginner's Guide to URL Rewriting [Apache & IIS ... Think you know all there is to know about Apache's mod_rewrite? Think again! Tamas gives a complete run-down of its capabilities, with practical and ...
CodeProject: URL Rewriting with ASP.NET. Free source code and ... Demonstrates the use of regular expression-based URL Rewriting, similar to mod_rewrite with ASP.NET; Author: Richard Birkby; Section: ASP.
Ask a Jedi: URL Rewriting example : Raymond Camden's ColdFusion Blog A blog for ColdFusion, AJAX, Web Development and other topics.Ask a Jedi: URL Rewriting example :

Videos:
WP-Amazon Have you ever wanted an easy way to link to a book, movie, or product that's relevant to what you're writing about? Typically, this is a pretty ...
New-Found Rapture (Fruits Basket) ***MANGA SPOILERS* ** Had to re upload because the last encoding I used FAILED on youtube. *Major timing issues and blocks and ew* For Higher Quality on YT, add &fmt ...
Evil within This is a video for my fanfic-"Past Comes To Haunt" which I'm in the Process of re-writing. The url will be posted here or in the comments area in ...
Sad Castle - RPG NOT mine, but my friend's. Trailer for Sad Castle (German RPG, not a video game, rather you're writing in this - no clue how to name it exactly ...
Web Marketing Burst - Lead Generation and Lead Capture Pages ... http://WebMarketingBurst.com has the most compr... (more) Added: March 03, 2008 http://WebMarketingBurst.com has the most comprehensive web ...
A Rocket To The Moon - I'm Not Saying Goodbye(Full, Lyrics ... ADD &fmt=18 TO URL FOR HQ SOUND! --------------------------------------- GO PREORDER A ROCKET TO THE MOON'S NEW EP 'Greetings From...' http ...
Yoga For Beginners: Online Video Hatha Yoga – Yoga is more than just poses, but when you’re first starting, you have to ...
Introduction to Web Design 2 Want to sound like you know what you are talking about, when you talk about creating your web pages, then you will want to also see this video ...
Intro to English 101 My name is John C. Hathaway, MA. I am an adjunct college writing instructor. I teach online, and I am creating a series of videos based upon ...
Feathers - Coheed and Cambria FOR HIGH QUALITY, ADD &fmt=18 to the end of the url One of the better songs (at least in my opinion, they're all great) from No World for ...




Search This Site:










newbie problem: server error

my first asp.net page

exception has been thrown by the target of an invocation

how to store users information in memory once they login?

csv import

server error in '/' application.

objectspace is missing ..!

application_end fired

object session - object not set to an instance of an object

creating an instance.

clearing and disposing of objects

a class html document

page cannot be displayed error

repeater

client side image maps

datasource=(local) ...

saving to database

button click event fires on localhost not isp - validation suspected

how to know how many unread pop3 email?

page expires

error exec proc

adding users to roles.

want to redirect to different pages depending on the resolution

a strange problem

report output options - excel, word

thin client using asp.net

comboobx selected value

class/method info

placing a logo in the url for my website

format my date

  Privacy | Contact Us
All Times Are GMT