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:

386 questions
111
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
  • 17,050
  • 12
  • 49
  • 63
64
votes
13 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,146
  • 8
  • 38
  • 67
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
  • 21,816
  • 20
  • 70
  • 107
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 =…
laukok
  • 47,545
  • 146
  • 388
  • 689
14
votes
3 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
  • 14,622
  • 30
  • 99
  • 154
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
  • 23,016
  • 32
  • 98
  • 148
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,146
  • 8
  • 38
  • 67
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
  • 212
  • 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,140
  • 3
  • 15
  • 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,180
  • 11
  • 37
  • 56
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,661
  • 5
  • 18
  • 29
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,376
  • 3
  • 16
  • 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
  • 5,236
  • 5
  • 38
  • 61
6
votes
4 answers

How to remove id and title from this url?

I need to remove ?id= and &title= from this url using .htaccess file. URL now - http://www.XXXX.com/video.php?id=XX&title=XXX-XXX-XXX What I need - http://www.XXXX.com/video.php/XX/XXX-XXX-XXX I already have removed .php from all links.
Nilohn
  • 133
  • 2
  • 11
1
2 3
25 26