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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:54:05+00:00 2026-06-01T06:54:05+00:00

I am rewriting my problem . Below I am giving all the details of

  • 0

I am rewriting my problem .
Below I am giving all the details of what i am trying to do, and what is the result I am getting. I hope to be very clear this time. I have a samples page here http://www.broadcast2world.com/samples.php.
All the links and data which we see on the page is coming from a database. Now suppose we click on a link “More Info” for a particular video say social control. A specific href for that video is triggered as <a href="video.php?pid='.$id.'"> . It passes its id over url in the format http://www.broadcast2world.com/video.php?pid=66.

I catch that id into a variable using

if(!isset($_GET['pid'])){
    $pageid='66';
}
else{
  $pageid=$_GET['pid'];  
} 

Using the $pageid variable, I run a query which ultimately prepare the page for that particular video.

What my SEO guy need is a url in the format http://www.broadcast2world.com/video/name-of-the-video.

Now the problem is that if I make a mod_rewrite amendments which is wonderfully explained by Ben below, I am not able to figure out, how to link that name-of-the-video to its id. I am sure there must be something I have to modify while creating specific url for videos as explained above. But I really don’t know what? Thanks again for your wonderful support

  • 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-01T06:54:06+00:00Added an answer on June 1, 2026 at 6:54 am

    Instead of id, you have to search the database based on title then.

    Here are what you are going to need.

    .htaccess

    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^videos/(.*)$ video.php?title=$1
    

    Link generation

    $title = "...";
    $title = str_replace(" ", "-", $title); //add dashes on the link
    echo "<a href="videos/$title">Click Me</a>";
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have a very strange problem with Apache .htaccess URL Rewriting and Redirection. Here's my
I have a small problem with url rewriting on apache. I would like it
UPDATE [Rewriting question to focus on the problem I am trying to understand.] Is
I have a small problem. I am busy trying to get messages from a
I have a strange problem. Page.IsPostBack returns always false after url Rewriting. I am
I am having problem in URL rewriting using .htaccess file, problem is as below.
So I have this regex problem and wondered if anyone could help me out?
Rewriting this question to be a little more succient. My problem is that I
I have a really big problem on my hands. I spend a week rewriting
I have a problem in rewriting my dynamic url pattern in localhost. here is

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.