Questions tagged [clean-urls]

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Semantic URLs (aka Clean URLs) are purely structural URLs that do not contain a query string and instead contain only the path of the resource.

Related tag's:

391 questions
114
votes
11 answers

How to version REST URIs

What is the best way to version REST URIs? Currently we have a version # in the URI itself, ie. http://example.com/users/v4/1234/ for version 4 of this representation. Does the version belong in the queryString? …
Mike Pone
  • 18,705
  • 13
  • 53
  • 68
66
votes
14 answers

Enable clean URL in Yii2

How can I enable clean urls in Yii2. I want to remove index.php and '?' from url parameters. Which section needs to be edited in Yii2 for that?
user7282
  • 5,106
  • 9
  • 41
  • 72
16
votes
2 answers

Using slugs in codeigniter

I have heard of people using slugs for generating clean urls. I have no idea how it works. Currently i have a codeigniter site which generates url's like this www.site.com/index.php/blog/view/7 From what i understand by maintaining a slug field it…
esafwan
  • 17,311
  • 33
  • 107
  • 166
15
votes
6 answers

How do I turn off viewstate for good?

Coming from a PHP background I love using clean URLs to grab data from one service to another. However, on some of my ASP.NET projects I get the horrible ViewState parameter in my URLs. Is there a way to turn this off globally? What affect will this…
Jon Winstanley
  • 23,010
  • 22
  • 73
  • 116
14
votes
2 answers

What is the best way to remove punctuation marks, symbols, diacritics, special characters?

I use these lines of code to remove all punctuation marks, symbols, etc as you can see them in the array, $pattern_page = array("+",",",".","-","'","\"","&","!","?",":",";","#","~","=","/","$","£","^","(",")","_","<",">"); $pg_url =…
Run
  • 54,938
  • 169
  • 450
  • 748
12
votes
7 answers

Clean urls not working in Drupal 7

I just installed and started using Drupal 7, and I followed the instructions to turn on Clean Urls. I clicked "Run the Clean URL test" button, but it failed to return any results. It loads up something and then refreshes the page. Can anyone shed…
picardo
  • 24,530
  • 33
  • 104
  • 151
11
votes
3 answers

Passing multiple parameters in a hyperlink in yii2 with clean urls, Html::a() doesnt generate clean url

I am trying to generate a hyper link by the method mentioned in http://www.yiiframework.com/doc-2.0/guide-helper-html.html#hyperlinks like this Html::a('Register', ['story/create', array('id' =>39,'usr'=>'11')], ['class' =>…
user7282
  • 5,106
  • 9
  • 41
  • 72
10
votes
3 answers

Gernerate custom urls within Magento

I am currently looking at trying to generate custom urls/routing using magento, currently I have set a default route in config.xml within the local module. standard
Ryan
  • 312
  • 1
  • 3
  • 13
8
votes
8 answers

Why should I use "Web 2.0"-style URLs?

In short, why use something like http://stackoverflow.com/badges/6/supporter instead of something "simpler" (and subjectively, at that) like http://stackoverflow.com/badges/6/. Even on my own site I've just been using /post/6/ to reference posts (by…
hydrapheetz
  • 3,540
  • 3
  • 17
  • 12
8
votes
9 answers

How to remove controller name from url making it clean in codeigniter

I have the following url.. http://localhost/ci/site_controller/home I want to remove site_controller controller from url resulting in.. http://localhost/ci/home How can I do this in CodeIgniter ? Note: If you'll ask what I've tried than I've just…
Yousuf Memon
  • 4,638
  • 12
  • 41
  • 57
7
votes
1 answer

Ignore trailing slash with Apache Rewrite

I'm using mod_rewrite to redirect like so: RewriteRule (work)/?$ $1.php [L] This sends any URL ending in /work or /work/ to work.php The problem is, when a trailing slash is included, it treats it as a directory, and not the file that it really is.…
cmal
  • 1,751
  • 5
  • 18
  • 29
7
votes
3 answers

Asian URLs or English slugs in webpages

Here's a tough one: I'm working on a website where most of the content is in Japanese. But consider this url: http://www.stackoverflow.com/質問/日本語のURLはどうする Most URL parsers, including stackoverflow's, don't know where to delimit URLs that contain…
Rei Miyasaka
  • 7,007
  • 6
  • 42
  • 69
7
votes
1 answer

Semantic URLs for static HTML files with .htaccess and mod_rewrite

mod_rewrite always baffles me... can anyone tell me the rules I need to get the following clean URLs? Desired URL on the left, real URL on the right. /our-work/ => /our-work.html /our-work/some-project/ => /our-work/some-project.html /contact/ =>…
Alistair Holt
  • 1,432
  • 3
  • 17
  • 28
6
votes
3 answers

SEO friendly url in Yii

I need a rule for http://example.com/post/view/id/1 url that will be displayed like this http://example.com/post/post_title. Instead of the id number i want to display the post name or title. My config looks like this: 'urlManager'=>array( …
Nogard
  • 172
  • 3
  • 12
6
votes
6 answers

Clean URLs for search query?

This works: HTML query htaccess RewriteRule ^search/([-0-9a-z]+)$ /search.php?q=$1 [L] Going through a search form:
DADU
  • 6,482
  • 7
  • 42
  • 64
1
2 3
26 27