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

  • Home
  • SEARCH
  • 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 8864939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T16:22:45+00:00 2026-06-14T16:22:45+00:00

Current pattern is http://example.com/questions.php?qcid=25&name=java and I want to make it http://example.com/25/java where qcid must

  • 0

Current pattern is http://example.com/questions.php?qcid=25&name=java and I want to make it http://example.com/25/java where qcid must be [0-9] and name must be readable and encoded. If it comprise of more than 1 word then ‘-‘ hyphen must be there between them. For example object-oriented.

  • 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-06-14T16:22:47+00:00Added an answer on June 14, 2026 at 4:22 pm

    In .htaccess

    Options +FollowSymlinks
    RewriteEngine on
    RewriteRule ^([0-9]+)/([a-z0-9\-]+)(?!(.css)|(.js))$ questions.php?qcid=$1&name=$2 [NC]
    

    In php, you’ll need to capture name and strip the hyphens and fix the caps if needed. As an example, lets say we want the name to be lower camel cased:

    $_GET['name'] = "this-is-a-test-name";
    
    $name = '';
    $exploded = explode('-',$_GET['name']);
    foreach($exploded as $piece) {
        $name .= ucfirst($piece);
    }
    // If you have PHP >= 5.3
    // $name = lcfirst($name);
    // Otherwise
    $name{0} = strtolower($name{0});
    
    echo $name;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ive ABSTRACT FACTORY pattern in one of my projects: http://www.dofactory.com/Patterns/PatternAbstract.aspx Code: public class QuestaoResposta
I have an application build with the MVVM pattern from Josh Smith ( http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
As Symfony Book suggests ( http://symfony.com/doc/current/book/routing.html#required-and-optional-placeholders ), in order to create an optionar placeholder
My current pattern is to merge topic branches into my main development branch once
I find myself using the current pattern quite often in my code nowadays var
I'm trying to figure out if I should continue on with a current pattern
How do I log inner exception with Log4NET? This is my current conversion pattern:
I have got this regex pattern that works with my current apache log format:
I'm going to do a wpf application using MVVM(It based on http://www.codeproject.com/KB/WPF/MVVMQuickTutorial.aspx ). This
Observer pattern? Where do i get examples of this in Java (i know google

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.