friendly-url

Making strings URL Friendly (eg: convert Montréal to Montreal)

I am writing a web application that requires friendly urls, but I'm not sure how to deal with non 7bit ASCII characters. I don't want to replace accented characters with URL encoded entities either. Is there a C# method that allows this sort of conversion or do I need to actually map out every single case I want to handle? ...

Grails UrlMappings with parameter values containing "."

Given this UrlMapping: "/foo/$foobar" { controller = "foo" action = "foo" constraints { } } Combined with this controller: class FooController { def foo = { def foobar = params.foobar println "foobar=" + foobar } } And with these requests: http://localhost:8080/app/foo/example.com give the ...

Geeky urls to Search Engine Friendly urls in IIS without sacrificing incoming links

I have a website where my present "geeky" urls look like: http://www.bestatdubaiholidays.co.uk/pages/Quote/Details.aspx?GUID=01a25b0c-e0ac-40ba-abd1-298f3abd9612 I want to change these to Search Engine Friendly ones - something like: http://www.bestatdubaiholidays.co.uk/the-palm-atlantis.aspx or http://www.bestatdubaihol...

Google sees something that it shouldn't see. Why?

For some mysterious reason, Google has indexed both these adresses, that lead to the same page: /something/some-text-1055.html and /index.php?pg=something&id=1055 (short notice - the site has had friendly urls since its launch, I have no idea how google found the "index.php?" url - there are "unfriendly" urls only in the content mana...

Asp.Net Url Handling

Is there a built in method to handle urls like Default.aspx/mycontent or do I need to handle it myself by taking the url and stripping of the file's path? I have tried searching for it but haven't been able to find anything. I'd like to handle .aspx/parameters and am not looking at Mod/URL Rewrite. ...

URL Rewriting - Redirect With No File Extension

I am currently using the following rules in an htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php This works well to ensure that myfile.php works as well as just myfile (with no extension). It also handles querystring's with no problems, so myfile?var=f...

Changing URL schemes in wordpress without breaking old URLs

I started a blog and after a couple posts decided I didn't like the /2009/03/26/foo-bar scheme for URLs (I changed to just /foo-bar). But for the couple posts posted before I changed this, I want to add rewrite rules so the old URLs don't break. I've tried every variation of the following I could think of in the .htaccess file, to no a...

Safe characters for friendly url

I need to make a website that will have articles, and I would like to make friendly urls for it, example: Title: Article Test should become http://www.example.com/articles/article_test Of course I need to remove some characters from the title like ? or #, but I'm not sure which ones to remove. Can someone tell me what characters are ...

REST Url Structure - Can ID of Resource go before controller?

The standard template for ASP.NET MVC (and MVC in general) seems to be {controller}/{action}/{id}, however, on a project i'm currently working on i'm not sure if that is an appropriate structure. If for example I had an application that controlled a car, to me it would make more sense to me to have the structure below: {car-rego}/{con...

ASP.NET MVC, Manipulating URL Structure.

How do I create a custom route handler in ASP.NET MVC? ...

foo.com/alice vs. foo.com/users/alice

It's of course nice to give users friendly URLs for their content on your site. But how best to do that? There are a lot of advantages to something like foo.com/users/alice, most importantly that you aren't cluttering up your root namespace. But I think simplicity for users trumps all that. A lot of big sites seem to agree (friendfee...

Good name for "URL-friendly title"?

I'm creating a dynamic website with articles. Each article has a title, like "How does one eat a dog and live with it?", but also something I'm now calling "URL Friendly Title", such as "eating-a-dog". I'm looking for a better word for "URL Friendly Title", because it's quite a mouthful. Wordpress calls them "Post Slug" but I dislike th...

mod_rewrite : why does it work locally and not online ?

I'm developing an app locally (under Domain name <mydomain>.dev). In order to work with friendly urls, i've set up my .htaccess like this: RewriteEngine on # Externally redirect to add missing trailing slash RewriteRule ^(([a-z0-9._\-]+/)*[a-z0-9_\-]+)$ http://example.com/$1/?%{QUERY_STRING}[NC,R,L] RewriteRule ^about/$ about.php [NC,L...

How can I shorten the URL query paramters?

Hi Everyone, My script is generating a very long URL just like the one below and I wonder how this can be shorten with an algorithm or technique? This is the long URL: http://example.com/script.php?param1=value1&amp;param2=value2&amp;param3=value3&amp;param4=value4&amp;param5=value5 I want to shorten it to something like this: http://...

Can an "SEO Friendly" url contain a unique ID?

I'd like to start using "SEO Friendly Urls" but the notion of generating and looking up large, unique text "ids" seems to be a significant performance challenge relative to simply looking up by an integer. Now, I know this isn't as "human friendly", but if I switched from http://mysite.com/products/details?id=1000 to http://mysite.co...

rules for slugs and unicode

After researching a bit how the different way people slugify titles, I've noticed that it's often missing how to deal with non english titles. url encoding is very restrictive. See http://www.blooberry.com/indexdot/html/topics/urlencoding.htm So, for example how do folks deal with for title slugs for things like "Una lágrima cayó en l...

Modify the URL without reloading the page

Is there any way I can modify the URL of the current page without reloading the page? I would like to access the portion before the # hash if possible. I only need to change the portion after the domain, so its not like I'm violating cross-domain policies. window.location.href = "www.mysite.com/page2.php"; // sadly this reloads ...

Intelligencia.UrlRewriter

Hi, I'm using the Intelligencia UrlRewriter on a project. It's working fine to rewrite urls typed into the browser. For example, if I enter http://localhost/People This is being correctly rewritten as: http://localhost/People.aspx Now, the problem is, when I am in the code behind I need to access the Friendly URL, but Request.S...

Best way to format pretty URLs for numeric IDs

Alright, so let's say I'm writing a forum application, and I want pretty URLs. However, all my tables use numeric IDs, so I'm not sure the best way to format the URLs for those resources. Let's pretend I'm trying to get a topic with ID 123456 and title This is a forum post. I've seen it done a couple ways: www.example.com/topic/123456 ...

What are the best-practices and patterns for url rewriting?

How do you go about designing a url rewriting 'strategy'? I've got a clean slate as I'm helping out with an as yet un-launched site (based on url parameters) so i've no need for redirecting existing search engine results. The first one that comes to mind is rewriting common typos. What else is there to think about? ...