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
28
votes
4 answers

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…
GateKiller
  • 74,180
  • 73
  • 171
  • 204
28
votes
2 answers

URL Friendly Username in PHP?

On my PHP site, currently users login with an email address and a password. I would like to add a username as well, this username they g\set will be unique and they cannot change it. I am wondering how I can make this name have no spaces in it and…
JasonDavis
  • 48,204
  • 100
  • 318
  • 537
28
votes
4 answers

C# Byte[] to Url Friendly String

I'm working on a quick captcha generator for a simple site I'm putting together, and I'm hoping to pass an encrypted key in the url of the page. I could probably do this as a query string parameter easy enough, but I'm hoping not too (just because…
LorenVS
  • 12,597
  • 10
  • 47
  • 54
23
votes
6 answers

Friendly URLs for ASP.NET

Python frameworks always provide ways to handle URLs that convey the data of the request in an elegant way, like for example http://somewhere.overtherainbow.com/userid/123424/ I want you to notice the ending path /userid/123424/ How do you do this…
minty
  • 22,235
  • 40
  • 89
  • 106
22
votes
8 answers

Generate SEO friendly URLs (slugs)

Definition From Wikipedia: A slug is the part of a URL which identifies a page using human-readable keywords. To make the URL easier for users to type, special characters are often removed or replaced as well. For instance, accented characters…
GG.
  • 21,083
  • 14
  • 84
  • 130
20
votes
2 answers

Is there a url rewriting engine for Tomcat/Java?

How can we provide URL-Rewriting support for Tomcat/Java ? mod_rewrite provides this functionality for Apache and can modify URLs even before they reach the handler (e.g. PHP). Is there a similar tool in Java/Tomcat ? To be more specific we need…
anshuman
20
votes
8 answers

ASP.NET turn off FriendlyURLs mobile.master page

I would like to turn the Site.Mobile.Master page off completely. My site is responsive and i want mobile browsers to use the same master page. How can i do this in ASP.NET friendly URLs Thanks
Piotr Stulinski
  • 9,241
  • 8
  • 31
  • 46
15
votes
2 answers

shortest encoding for Guid for use in a URL

Mads Kristensen got one down to 00amyWGct0y_ze4lIsj2Mw Can it go smaller than that?
mcintyre321
  • 12,996
  • 8
  • 66
  • 103
13
votes
7 answers

Pretty URLs in Google App Engine

I want to pass a parameter 'A1B2C3' to a GWT application based on Google App Engine. I do it like www.example.com/index.html?key=A1B2C3. Although it's working, I'd like to use pretty URLs. Is it possible to do URL rewriting on Google App Engine? I…
Mike Brecht
  • 151
  • 1
  • 4
12
votes
4 answers

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,…
bustrofedon
  • 281
  • 4
  • 15
12
votes
6 answers

Enable human readable URL's in .htaccess

Preface: Yes this question seems like duplicated, and I found related questions, but answers from there didnt help to me. :( Hello, I want to add human readable URL's support for my PHP project. For now my URL quesry string looks…
nowiko
  • 2,507
  • 6
  • 38
  • 82
12
votes
3 answers

Customize FacesServlet to get rid of .xhtml extension

I have Login.xhtml and Home.xhtml. I configured the url pattern in web.xml as follows Faces Servlet /faces/*
kark
  • 4,763
  • 6
  • 30
  • 44
11
votes
6 answers

Using Primary Key / ID Field as an identifier in a URL

What are the pros and cons of using your databases primary key as a URL identifier? As an example, http://localhost/post/view/13 - 13 being my primary key for my posts table. Some sites like reddit use what I assume is a unique id that is not the…
anonymous
11
votes
3 answers

Mode Rewrite; with/without trailing slash on end of url?

I basically tried this mode_rewrite rule below. It works with a slash on the end but I want it to work whether it has a trailing slash on the end or not. Basically I want it like this as some people see it as normal with a slash on the end and…
PHPLOVER
  • 7,047
  • 18
  • 37
  • 54
11
votes
7 answers

$_GET and URL Rewriting for PHP

How does URL rewriting affect the $_GET parameter for PHP? Say I have a URL like http://example.com/index.php?p=contact and I use $_GET['p'] to tell index.php to serve the contact page. If I use a rewrite rule that converts the URL to…
VirtuosiMedia
  • 52,016
  • 21
  • 93
  • 140
1
2
3
81 82