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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:29:57+00:00 2026-06-17T07:29:57+00:00

I am coding website in PHP And My links are :- http://example.com/science.php?category=alien&title=Find+UFO+Just+over+your+head+by+clicking+here Now, I

  • 0

I am coding website in PHP

And My links are :-

http://example.com/science.php?category=alien&title=Find+UFO+Just+over+your+head+by+clicking+here

Now, I want to show url in my view source as :-

http://example.com/science.php/alien/Find+UFO+Just+over+your+head+by+clicking+here

Also i want this as working link :-

From .htaccess [with the help of generateit.net > mod_rewrite generator] here is the code:-

RewriteEngine On
RewriteRule ^([^/]*)/([^/]*)$ /science.php?category=$1&title=$2 [L]

Now what do i need to do in PHP , to make this URL Valid.

Do i need to write below link :-

<a href="http://example.com/science.php?category=<?php echo $rows['category'] ?>&title=<?php echo htmlentities($rows['title']); ?>" > <?php echo $rows['title'] ?></a>

in my code or do i need to write :-

<a href="http://example.com/science.php/<?php echo $rows['category'] ?>/<?php echo htmlentities($rows['title']); ?>" > <?php echo $rows['title'] ?></a>

or some function to make above url.

Thank you ! I am hunting for this knowledge since long time.

Thanks once again

  • 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-17T07:29:59+00:00Added an answer on June 17, 2026 at 7:29 am

    Actually, there is no need for any change from PHP Side, because php will receive request after translated by .httaccess file.

    Now i think there is something wrong with your .httaccess conditions, please try below code:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^([^/]*)/([^/]*)/([^/]*)$ /$1.php?category=$2&title=$3 [L]
    

    and after save, try link below

    http://example.com/science/alien/Find+UFO+Just+over+your+head+by+clicking+here
    

    I hope this help

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

Sidebar

Related Questions

I have noticed that many websites use urls that end in website.com/index.php?var=value&var2=value2 and I
So, I am beginning the process of coding a PHP application website, which will
I am coding a website in PHP and Javascript which implements private messaging functionality,
I am coding a website in php. I want to setup a Linux distribution.
I'm currently coding a php website. however one of the requirement is to have
I'm building a website to learn coding. I have a claim.php which is a
I'm coding a website in PHP/MySQL and I'd like to implement a similar to
After finishing, the website structure, and php coding, now i want to launch it
I'm just a beginner of a PHP coding. I need to know normally industry
I've been coding websites for a couple of years now, mostly in php and

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.