Questions tagged [pretty-urls]

Pretty URLs are URLs that are SEO-friendly and easy-to-read.

Pretty URLs are URLs that are SEO-friendly and easy-to-read. Usually, the pretty URLs are handled by rewrite engines, which convert the pretty URLs to query variables that the server understands and can use within the executed scripts. Pretty URLs have many pros - they are easy to read and more understandable from the user, and easier to index by the search engines. They are easier to manage and make more sense for the users when navigating the websites. There aren't many cons, but one that is worth to be mentioned is the fact that pretty URLs may fail to work on some servers, where the rewrite engines are disabled.

175 questions
0
votes
1 answer

Why are my URLs messed up by Facebook?

The link to certain pages on a site I've written looks like this: http://myhymnal.net/2/be-thou-my-vision That would be the id and a slug. When I paste this URL into the Facebook post field, the URL it ends up fetching an "example" of is the…
Svish
  • 152,914
  • 173
  • 462
  • 620
0
votes
1 answer

how to hide login view name in using pretty faces

I have one application running on tomcat sever.I removed the path in in server.xml so i am able to access the application like http://localhost:8080/login.xhtml I am using Pretty faces as well for URL rewrite. Now i want to know how to send a…
Rahul Singh
  • 781
  • 11
  • 27
0
votes
1 answer

Pretty URL via separate folder and index.html file inside or rule in .htaccess

I have static site (html + css) generated by nanoc. It works under Apache. I want use pretty url instead of .html suffix at the end. Like this: http://domain.ru http://domain.ru/page/page1/ http://domain.ru/page/page2/ instead of…
aleksandr
  • 77
  • 1
  • 10
0
votes
2 answers

Remove the suffix in urls

Yes, I know this has been asked hundreds of times. But I just can't find a version that actually works. Currently, all the ones so far I've tried currently work in removing .php, but that is when the problems begin. A few pages on my site depend on…
ChocCookieRaider
  • 135
  • 1
  • 2
  • 8
0
votes
2 answers

mod_rewrite is not working, tried all possible ways

I swear am not able to get this, i read 10 tutorials but unable to make it work...I wanted pretty urls so my directory structure goes like this localhost/my_website/home.php?page=dashboard I have an .htaccess file in my_website folder with these…
Random Guy
  • 2,878
  • 5
  • 20
  • 32
0
votes
0 answers

Is it possible to route uri's without classes?

Basically what the title says. I'm working on a project that does not involve classes and I would like to implement htaccess and mod rewrite to create pretty url's. Here are a few examples of what I want to be able to route. My file and directory…
ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81
0
votes
1 answer

Pretty Urls with Mod_Rewrite

I would like to rewrite the following URL string from: product.php?category=abstract_and_patterns&page=1 To: abstract-and-patterns Now it's important to note that both the category and page variables will always be different depending on what page…
Gareth Daine
  • 4,016
  • 5
  • 40
  • 67
0
votes
1 answer

rails pretty routing

I have news conroller where news select by year. in routes.rb I have get 'news' => 'pages#news' get 'news/:year' =>'pages#news' url http://localhost:3000/news/2012 is ok but when I try to create link, it's no pretty. for example: = link_to…
achempion
  • 794
  • 6
  • 17
0
votes
1 answer

How to create pretty URL's with a custom MVC Framework in PHP?

So, I am beginning the process of coding a PHP application website, which will be coded in the MVC architecture,but would like to implement the method of using Pretty URL's with it. Since I have never created my own Pretty URL code before, I'm not…
ShoeLace1291
  • 4,551
  • 12
  • 45
  • 81
0
votes
1 answer

.htaccess pretty url issue

I'm changing mydomain.com/directory/?name=lorem&action=posts to mydomain.com/directory/lorem/posts But I'm now trying to add one called "other" so I would like to get…
Frank
  • 1,844
  • 8
  • 29
  • 44
0
votes
1 answer

RewriteRule to remove extraneous URL parts for pretty URLs

Background Trying to recreate StackOverflow-style pretty URLs using Apache's mod rewrite and PHP. Problem This works great: RewriteEngine on RewriteRule ([0-9]+)$ index.php?id=$1 [L] URLs like…
Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
-1
votes
3 answers

pretty url with .htaccess?

i just created a new wordpress page template that runs some php&mysql scripts inside it and i would like to apply mod rewrite to it's subpages. for instance i have the following link…
Steff
  • 1
  • 1
-1
votes
1 answer

Using IIS Rewrite for Clean URLs: Any difference between matching "^" or ".*"?

I'm creating a rewrite rule in an IIS (v10.0) configuration file to enable clean URLs ("pretty URLs") by capturing all incoming requests and routing anything that doesn't specifically match a physical directory or file in the system to a single…
-1
votes
1 answer

How to redirect all traffic to the script ignoring folders with webpack-dev-server?

I have a SPA with pretty url navigation (/link instead of #link). It works fine as long as I start on the root and navigate around from there but if I go directly to /link in the browser I get Cannot GET /link. How do I rewrite all requests to go…
Alfred
  • 7,071
  • 4
  • 27
  • 35
-1
votes
4 answers

PHP minus symbol in URL (rawurlencode vs urlencode)

I've tried using rawurlencode and urlencode, both give me "&" and the other "+". What i'm asking is, is there a PHP function that puts "-" in between words, like on Stack Overflow? Thanks
benhowdle89
  • 36,900
  • 69
  • 202
  • 331
1 2 3
11
12