Questions tagged [slug]

part of a URL that makes it more human readable or SEO-friendly, but without necessarily being required by the web server.

A slug is a part of a URL that makes it more human readable or SEO-friendly, but without necessarily being required by the web server. Slugs can be generated from a page title and are typically the last part of the url.

Example:

  • Page Title: c# - What's the difference between String and string? - Stack Overflow
  • Slug: whats-the-difference-between-string-and-string

The full URL including the slug is https://stackoverflow.com/questions/7074/whats-the-difference-between-string-and-string. Note that punctuation in the url is typically removed.

1108 questions
-1
votes
1 answer

change url slug of encrypted cakephp script

I'm using a licensed cakephp script where appcontroller.php, bootstrap.php, and most of the core files are encrypted. How do I change the url slug http://mydomain.com/property/cool-activity to http://mydomain.com/activity/cool-activity without…
-1
votes
1 answer

generating slugfield from User

This is my models.py file class UserProfile(models.Model): user = models.ForeignKey(User, unique=True) toc = models.BooleanField(default=False) dob = models.DateField(blank=False, null=True) street_address =…
-1
votes
1 answer

Looking to finish my url encoding in php

I have a slug function that I am using from another tutorial. public function createSlug($slug) { // Remove anything but letters, numbers, spaces, hypens // Remove spaces and duplicate dypens // Trim the left and right,…
utooall
  • 89
  • 9
-1
votes
1 answer

.htaccess mulitple language (slug URL/friendly URL)

I am working on a multiple language site. For a URL .com/business-industry/?parent_id=3&value=cars it works perfectly. This will make the URL .com/business-industry/3/cars But the site also has .com/nl/ and .com/de/ I've added the next rules to…
-1
votes
2 answers

PHP Article Slug instead of ID

so I've saved an article slug to my database and usually I would filter my pages with the art_id like so, $sql_articles = "SELECT * FROM app_articles WHERE art_id=".$_GET['art_id']; $result_articles = query($sql_articles); and I pass would pass the…
user2201765
  • 917
  • 5
  • 16
  • 21
-1
votes
1 answer

How can I make a Wordpress page override an existing directory (not sub-directory)?

I have an existing directory called /final-fantasy-vii/ which has an /images/ folder inside of it. I created a page with the same slug of "final-fantasy-vii" and when I go to access that page online, it shows me the /images/ folder instead of the…
Omar
  • 21
  • 1
  • 5
-2
votes
1 answer

Creating slugs from graphQL query in Gatsby

I am connecting to a database, and this query is showing me the IDs that I want: allSongs { edges { node { id } } } So now I want to be able to load a dynamic page like…
Icaval
  • 31
  • 6
-2
votes
1 answer

slug laravel override login

I have a route in web.php like this Route::get('/{slug_category}', 'WelcomeController@cdetail')->name('cdetail'); its success when I access category like /action, /horror, etc but this route was overridden my default /login laravel how can I fix the…
-2
votes
1 answer

Query not returning if there's a minus in the title

My query doesn't return everything if an min is in the title. Code: $stmt = $db->runQuery("SELECT all * FROM articles WHERE id = :id AND title LIKE CONCAT(:slug, '%')"); $stmt->bindParam(':id', $_GET['id'],…
Test
  • 47
  • 4
-2
votes
1 answer

How to reset unused Wordpress slug

I use "virtual pages" in Wordpress (you can google it) and i want to use some page slug that have been used before for a real page, for example: "domain.com/test". If i use "domain.com/test1" for example it will work great but if i use…
mondi
  • 415
  • 3
  • 14
-2
votes
1 answer

implementing slug in codeigniter

I have tried to do url_title(). but how to customize this function?
Sumit
  • 1
-2
votes
1 answer

Generate a friendly urls using UTF-8 encoding in javascript

I am trying to make friendly url from title. I find out many solutions but it has still problem with unicode character. eg: 'xin chào' in vietnamese I saw https://sluggenerator.com/ was OK. Could anyone helps me to do like this by…
M999
  • 25
  • 4
-3
votes
2 answers

Find and remove apostrophe and one letter before?

The goal is to clean up a character string and delete elements not important for the user and SEO ie the (letter before the apostrophes) in my case. I would mainly like a solution or an explanation of a regex that would do that in PHP but the logic…
Benjamin Vbg
  • 79
  • 11
1 2 3
73
74