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 4613438
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:32:55+00:00 2026-05-22T01:32:55+00:00

My site has articles and I would like the URL to be like so:

  • 0

My site has articles and I would like the URL to be like so:
example.com/(article id)/(article title)

There are two reason I would like the URLs like so, SEO, and readability.

This setup is close to how stackoverflow is set up. And just like on stackoverflow, I don’t want the title to be required but if it’s not including in the I want the back-end to append the title to the URL.

To understand what I mean, take the current page’s URL, remove the title form it and go to that new url. If you notice when the page is refreshed the title was automatically appended to the URL.

When I think about how to achieve this, it requires two queries. The first query will get the title based on the id, then form the new url, and redirect to it. The second URL will query the database with the id again this time displaying the article.

Is this the only way? Can I append the extra param without actually redirecting?

Side note: I am using cakePHP

  • 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-22T01:32:56+00:00Added an answer on May 22, 2026 at 1:32 am

    I think that yes, this is the only way.

    Call #1 to example.com/(article id): the server would query the database for the id, see that the url isn’t the canonical one[1] and do a redirect.

    Call #2 to example.com/(article id)/(article title) would behave as normal, meaning some more queries to the database…

    ^ I suggest you store an article’s generated url path so you could use it in other places too.
    This way, if no title was provided, the path would just be “/(article id)” and you wouldn’t need to do a redirect here.

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

Sidebar

Related Questions

I have seen multiple articles on redirecting Urls when the site has been redesigned
I have a problem with my site. The site has multiple entities: Articles, Posts,
I'm bulding a Wordpress site that has a box for the main article. This
My site has several listing pages and on each page, I'd like to enable
My site has few global configurations. For example "smtp-server address", "company address", etc. Of
building a site which has content for each section. urls range from; /work/ /work/print/
I have a few programming articles I would like to write, but I do
I've a site and each article page with its unique URL can be liked.
I have just asked these two questions, one on flash seo url best practices
this is what i would like to do... In my site,each post can have

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.