Questions tagged [friendly-url]

A friendly URL is a website address that does not contain a query string or complex strings in the URI, instead relying on a human-readable, SEO-friendly resource path after the website authority (e.g. https://www.stackoverflow.com/questions/tagged/friendly-url).

A friendly URL is a website address that does not contain a query string, instead relying on a human-readable, SEO-friendly resource path after the website authority (e.g. https://www.stackoverflow.com/questions/tagged/friendly-url).

Most of the time it is achieved with the help of a Rewrite Engine, such as mod_rewrite for Apache or mod_rewrite for Lighttpd. Many content management frameworks have the ability to generate friendly URL's built in.

1221 questions
2978
votes
21 answers

How do I modify the URL without reloading the page?

Is there a 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 it's not like I'm violating cross-domain…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
267
votes
21 answers

How does Stack Overflow generate its SEO-friendly URLs?

What is a good complete regular expression or some other process that would take the title: How do you change a title to be part of the URL like Stack Overflow? and turn it into…
wusher
  • 12,291
  • 22
  • 72
  • 95
234
votes
13 answers

What are the safe characters for making URLs?

I am making a website with articles, and I need the articles to have "friendly" URLs, based on the title. For example, if the title of my article is "Article Test", I would like the URL to be http://www.example.com/articles/article_test. However,…
Paulo
  • 7,123
  • 10
  • 37
  • 34
175
votes
8 answers

Redirect all to index.php using htaccess

I am writing a simple PHP-based MVC-ish framework. I want this framework to be able to be installed in any directory. My PHP script grabs the request uri and breaks it off into segments. It makes segment 1 the controller and segment 2 the action.…
David Ericsson
  • 2,570
  • 2
  • 19
  • 33
161
votes
5 answers

Reference: mod_rewrite, URL rewriting and "pretty links" explained

"Pretty links" is an often requested topic, but it is rarely fully explained. mod_rewrite is one way to make "pretty links", but it's complex and its syntax is very terse, hard to grok, and the documentation assumes a certain level of proficiency in…
deceze
  • 510,633
  • 85
  • 743
  • 889
136
votes
11 answers

Is a colon `:` safe for friendly-URL use?

We are designing a URL system that will specify application sections as words separated by slashes. Specifically, this is in GWT, so the relevant parts of the URL will be in the hash (which will be interpreted by a controller layer on the…
Nicole
  • 32,841
  • 11
  • 75
  • 101
115
votes
14 answers

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…
David Webb
  • 190,537
  • 57
  • 313
  • 299
75
votes
8 answers

How to create friendly URL in php?

Normally, the practice or very old way of displaying some profile page is like this: www.domain.com/profile.php?u=12345 where u=12345 is the user id. In recent years, I found some website with very nice urls like: www.domain.com/profile/12345 How…
Peter
  • 1,073
  • 2
  • 11
  • 9
72
votes
5 answers

Should I use accented characters in URLs?

When one creates web content in languages different than English the problem of search engine optimized and user friendly URLs emerge. I'm wondering whether it is the best practice to use de-accented letters in URLs -- risking that some words have…
Wabbitseason
  • 5,641
  • 9
  • 49
  • 60
64
votes
11 answers

How can I remove file extension from a website address?

I am designing a website. I want my website address to look like the following image: I don't want my website to look like http://something.example/profile.php. I want the .php extension to be removed in the address bar when someone opens my…
sumit
  • 10,935
  • 24
  • 65
  • 83
56
votes
19 answers

What makes a "friendly URL"?

I've read a great deal of discussion recently (both on this site and elsewhere) about "friendly URLs" but I'm not sure what exactly makes a URL "friendly" and why we really even care (up to a certain point). Illustration: The following is an…
Matt Peterson
  • 5,169
  • 4
  • 32
  • 34
49
votes
8 answers

How to hide the .html extension with Apache mod_rewrite

I have a small number of static sites where I simply want to hide the .html extension: the URL /foo fetches the static file /foo.html the browser still displays the URL /foo The client can then send out bookmarks in the style example.com/foo…
Dave Everitt
  • 17,193
  • 6
  • 67
  • 97
42
votes
12 answers

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",…
James White
  • 2,062
  • 2
  • 24
  • 36
39
votes
3 answers

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…
Kieron
  • 26,748
  • 16
  • 78
  • 122
34
votes
5 answers

Do SEO-friendly URLs really affect a page's ranking?

SEO-friendly URLs are all the rage these days. But do they actually have a meaningful impact on a page's ranking in Google and other search engines? If so, why? If not, why not? (Note that I would absolutely agree that SEO-friendly URLs are nicer to…
Lee Harold
  • 1,147
  • 3
  • 12
  • 17
1
2 3
81 82