Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 474403
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T00:17:02+00:00 2026-05-13T00:17:02+00:00

I’m about to setup permalinks on a website and I’m wondering what sort of

  • 0

I’m about to setup permalinks on a website and I’m wondering what sort of conventions I should follow in regards to generating them from the existing table of news articles.

So far here are the rules/steps I’ve come up with:

  1. Create a dump file of my live database, set it up locally
  2. Add a new ‘permalink’ column to my news_articles table with ALTER table ADD column slug VARCHAR(100) ( Not sure on the data type or length, suggestions? )
  3. Update every row in my news_articles table, such that

the permalink column by default is replaced by the title, after the title goes through some formatting:

Disclaimer: the titles are Russian
Cyrillic and not English so I don’t
think I can get away with an easy
regex replacement, unless perhaps I
rely on unicode code ranges except I’m
not familiar with the range of the
Cyrillic characters so I’ll do manual
replacement and the rules I’ve defined
so far are:

  • replace all spaces with an underscore
  • strip off leading/trailing commas and periods
  • remove all single/double quotes
  • remove all question marks
  • & becomes the russian word for ‘and’

I’d appreciate any advice on my current strategy before I actually execute it, as there are thousands of articles.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T00:17:03+00:00Added an answer on May 13, 2026 at 12:17 am

    Some comments/suggestions

    • replace all spaces with an underscore (how about hypen instead of underscore, like tags in SO)
    • strip off leading/trailing commas and periods (leading/trailing spaces too)
    • remove all single/double quotes (starting and trailing ones, if not replace with hyphens)
    • remove all question marks (same as above and all other punctuation characters like “ ” (left/right double quotes) and symbols like % and = etc etc)
    • & becomes the russian word for ‘and’ (Do you mean и? has to be readable without need for url encoding)

    Update:
    * convert all characters to lower case (kinda subjective but it’s a common practice and more readable then all upper case)

    One more suggestion, this is a trick which I used to check if my url path or slug do not contain any urlencoded string. After formulated the slug string, I will perform an urlencode and compare with the pre-encoded one. They should be the same.

    Example for this post, if the slug happened to be “permalink-slug:best-practices“, the urlencoded one will be “permalink-slug%3Abest-practices“, not really readable and defeats the purpose of slug which you will know/agree. So it’s really easy to know the orginal string don’t work because it is different after urlencoding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I used javascript for loading a picture on my website depending on which small
I am reading a book about Javascript and jQuery and using one of the
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I am currently running into a problem where an element is coming back from

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.