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
10
votes
1 answer

Yii2/PHP/IIS7 - URL Rewrite and File Permissions (Pretty URL issue)

I have a web.config file with the following text, although not relevant to my problem...
Shahid Thaika
  • 2,133
  • 5
  • 23
  • 59
10
votes
3 answers

Yii2:-Pretty URL's are formed, but not working (says 404 NOT FOUND)

I have started learning yii2 and I tried to do pretty URL stuff, but failed. What I did:- in config/web.php (I have edited below): 'urlManager' => [ 'class' => 'yii\web\UrlManager', // Hide index.php 'showScriptName' =>…
Alive to die - Anant
  • 70,531
  • 10
  • 51
  • 98
8
votes
2 answers

Displaying both slug and ID in URL, but route by ID only in Django

What I'm trying to achieve is: my News app should display a slug, but only query the article by ID in the form of /news/24/this-is-the-slug Unfortunately I'm getting a NoReverseMatch: Reverse for 'news_detail' with arguments '('',)' and keyword…
weeheavy
  • 253
  • 3
  • 18
7
votes
2 answers

Pretty url of a MEAN-stack application in nginx

(* As some comments recommended, I removed index.ejs and use index.html in the project by following this answer. So I have adjusted my OP *) I develop in Mac with apache a MEAN-stack application that can be requested by…
SoftTimur
  • 5,630
  • 38
  • 140
  • 292
5
votes
1 answer

Struts2 regex configuration

I am creating a Struts2 web app. I want an URL like www.xyz.com/portal/orgCode/signin, this orgCode is dynamic, so I am using regex for that. I configure struts.xml like:
5
votes
1 answer

Hide a directory with htaccess

I'm trying to hide a directory users of url (ex.:): meusite.com.br/users/teste but so far not succeeded. Like that by accessing meusite.com.br/teste show the content inside the folder teste and, if accessed URL meusite.com.br/users/teste the /users/…
Igor
  • 645
  • 4
  • 16
  • 37
4
votes
0 answers

Yii v1.1 redirects to 404 nginx

My Yii 1.1 app redirects to site.com/login and gets error 404. Yii app hasn't any problems, it's an old app which I want to install on my server. The problem has to be with nginx configuration with mod_rewrite because pretty urls are not processed…
Regular User
  • 145
  • 7
4
votes
7 answers

Laravel 4 remove Index.php from URL

I need some help with laravel 4 application i need to remove Index.php from url i have tried the solution that has been mentioned in laravel documentation Pretty URLs Apache The framework ships with a public/.htaccess file that is used to allow…
Ahmad abdallah
  • 103
  • 1
  • 7
4
votes
1 answer

Struts2 better URLs with dot inside

Let's say we need to get a login form with pre-defined username. So if user goes to url: //somehost:8080/myapp/auth/myusername the action should take myusername as input parameter. I tried http://www.struts2.info/blog/better-urls-with-struts2 as…
never
  • 671
  • 1
  • 6
  • 18
4
votes
5 answers

htaccess - One clean URL working but not the other

htaccess files have never been a strong point for me unfortunately. I'll just jump right in: #Turn RewriteEngine on Options +FollowSymLinks RewriteEngine on #Canonicalize URL RewriteCond %{HTTP_HOST} !^www\.domain-removed\.com [NC] …
no.
  • 2,356
  • 3
  • 27
  • 42
3
votes
1 answer

.htaccess pretty url for blog

I need a help with blog which is in core php and want to create a pretty url using .htaccess I have a folder called blog where there are two files. index.php which is a blog page post.php which display a signle blog post so what I want to achieve is…
3
votes
2 answers

Yii2: Remove controller from URL

I am using the advanced template. I created all my actions on the SiteController, so all my urls are domain.com/site/something, and I need to remove the word "site" from the url so it will be domain.com/something. I tried the following rules based…
3
votes
0 answers

php Ajax - Pretty URL for Dependent Dropdown search result with .htaccess

It takes me a few paragraphs to explain this problem. I apologize for any inconvenience this may have caused you. I tried hard and researched a lot to solve the following problems, but so far I couldn't find solutions. I am working on a directory…
E. Edgo
  • 49
  • 4
2
votes
1 answer

Creating pretty links for URLs with multiple query parameters

I am working on a website that is more of a search directory and haven't been able to find a clear answer on how to automatically create pretty links from long URL's with multiple query parameters (Wordpress). For example, if the link looks like…
Ryan
  • 31
  • 3
2
votes
1 answer

Cakephp 1.3 url rewriting

I have my cakephp 1.3 console installed on hostgator server using SSH. I baked an app and everything seems to be working fine, but when I go to the app http://www.domain.com/app everything is green except for the second one which states: URL…
alex
  • 655
  • 1
  • 8
  • 19
1
2 3
11 12