friendly-url

How do you include a webpage title as part of a webpage URL?

What is a good complete Regex or some other process that would take "How do you change a title to be part of the url like Stackoverflow?" and turn it into "how-do-you-change-a-title-to-be-part-of-the-url-like-stackoverflow" that is used in the smart urls? The dev environment is I am using is Rails but if there are some other platform sp...

How do I generate a Friendly URL in C#?

How can I go about generating a Friendly URL in C#? Currently I simple replace spaces with an underscore, but how would I go about generating URL's like Stack Overflow? For example how can I convert: How do I generate a Friendly URL in C#? Into how-do-i-generate-a-friendly-url-in-C ...

Friendly URLs for ASP.NET

Python frameworks always provide ways to handle urls that convey the data of the request in an elegant way: think http://somewhere.overtherainbow.com/userid/123424/ I want your to notice the ending path /userid/123424/ How do you do this in ASP.NET? ...

Why do some websites add "Slugs" to the end of URLs?

Many websites, including this one, add what are apparently called slugs - descriptive but as far as I can tell useless bits of text - to the end of URLs. For example, the URL the site gives for this question is: http://stackoverflow.com/questions/47427/why-do-some-websites-add-slugs-to-the-end-of-urls But the following URL works j...

ASP.NET UrlRewriting and Constructing Page Links

So this post talked about how to actually implement url rewriting in an ASP.NET application to get "friendly urls". That works perfect and it is great for sending a user to a specific page, but does anyone know of a good solution for creating "Friendly" URLs inside your code when using one of the tools referenced? For example listing a...

Friendly url scheme?

One of the many things that's been lacking from my scraper service that I set up last week are pretty URLs. Right now the user parameter is being passed into the script with ?u=, which is a symptom of a lazy hack (which the script admittedly is). However, I've been thinking about redoing it and I'd like to get some feedback on the option...

Supporting URLs like /similar-to-:product in Ruby on Rails?

I have been trying to use routes.rb for creating a URL /similar-to-:product (where product is dynamic) for my website. The issue is that routes.rb readily supports URLs like /:product-similar but doesn't support the former because it requires :product to be preceded with a separator ('/' is a separator but '-' isn't). The list of separat...

Rewrite all queries to not need the .php extension using a mod_rewrite RewriteRule.

I'd like all queries like http://mysite.com/something/otherthing?foo=bar&x=y to be rewritten as http://mysite.com/something/otherthing.php?foo=bar&x=y In other words, just make the .php extension optional, universally. ...

Simplifying VisualSVN Server's URLs

We're currently running an svnserve instance as NT service. While this works, it's needlessly cumbersome to administer, and I'd like to move on to the much simpler VisualSVN Server. (Bonus side benefits include Windows-integrated authentication and, thanks to HTTP/WebDAV, browsing of the latest revision.) That said, the current server o...

Which is better for a rails site? /{login} or /user/{login}

Which is better (for the user, for longevity, for performance, for whatever) to have: http://{site}/{login} e.g. http://wildobs.com/adam_jack or http://{site}/user/{login} Pros of former: User feels more special. URLs are shorter. Cons of former: Cannot have users w/ logins matching keywords, and keywords likely grow over time....

How do I make virtual URLs point to .aspx pages in asp.net deployed on an IIS? (preferably without IIS)

What's the best way to get a nice clean URL structure like stack overflow has? Do I need to use IIS for this? Or is there a way I can do it with some sort of mapping file in asp .net? The site I want this for has hundreds of pages, and is already deployed. I would like a method that requires the least amount of changes possible. Not...

How can I create a friendly URL in ASP.NET MVC?

How do I generate friendly URLs within the ASP.NET MVC Framework? For example, we've got a URL that looks like this: http://site/catalogue/BrowseByStyleLevel/1 The 1 is Id of the study level (Higher in this case) to browse, but I'l like to reformat the URL in the same way StackOverflow does it. For example, these two URLs will take yo...

Creating friendly urls to dynamic resources in struts2

I have a struts2 application with a single page that may show one of a number of values stored in a database. The application is for a school with many departments and each department has many programs. The department page is accessed using a url like this department.action?id=2 and the DepartmentAction will load the Department with i...

Where to store the complete url in a cms?

I'm creating a cms and have not yet settled on the matter of where to store the complete url for a given page in the structure. Every page have a slug (url friendly name of the page) and every page has a nullable (for top-level pages) parent and children. Where do I store the complete url (/first-page/sub-page) for a given page? Should...

Special Characters in URL

We're currently replacing all special characters and spaces in our URLs with hypens (-). From an SEO and readability point-of-view this works fine. However, in some cases, we are feeding parts of the URL into a search after stripping the hyphens out. The problem occurs when the search term should have hyphens as it returns no results whe...

How to create friendly url's in asp.net 2

I tried using the IHttpModule and managed to convert the urls just fine, but all of my images returned path error (all going through the new url directory). whats the solution? ...

Good URL strategy for sitemap and SEO

I run a site where users have their own profile pages. They are also able to post products for sale (that they have made) and write/import blog posts. I am going to be implementing a sitemap and I need to make a final decision with the URL strategy. Here's what I currently have for products (where 1234 is the product ID that I use to lo...

Are there any Portal products that can generate friendly URLs?

Currently, we are using WebSphere Portal v5.1, and the URLs are about a un-friendly as a URL could get. For example: http://www.foo.com/wsps/portal/!ml/QjzQ0IhyR0UAkc39Aw!!/delta/base64xml/L3dJ82XzBfQ1A! I have removed a bunch of the characters, but you get the idea. One of our frustrations is that the URLs often end with punctuation...

When is it OK to intentionally obfuscate URLs?

Having friendly URLs is generally a good thing. However, there are sometimes when it seems like a bad idea. What is your rule of thumb? For instance, consider a situation where I want to show a Registration Success page. I want all of the underlying logic to be the same. However, depending on how they registered, I may want to displ...

Problem with images and stylesheet while using urlrewriter

I'm using the urlrewriter.net as recommended in several questions in here. I'm having difficulties with displaying images and with the stylesheet. I read ScottGu's Blog (again as recommended in here) and in the end he does reffer to this problem and states to use ~/ for server controls etc. ("Handling CSS and Image Reference Correctly" ...