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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:31:44+00:00 2026-05-21T18:31:44+00:00

I have a database that has a url colomn like this-is-the-title.php I want to

  • 0

I have a database that has a url colomn like this-is-the-title.php
I want to active mod_rewrite here with:

Options +FollowSymlinks
RewriteEngine On
RewriteRule ^([a-zA-Z0-9-/]+)$ news.php?url=$1
RewriteRule ^([a-zA-Z0-9-/]+)/$ news.php?url=$1

But I have problem with .php extension. This rule works only with this-is-the-title not this-is-the-title.php . Is there any way to active mod rewrite with titles that have .php extension or I have to change titles?

Thanks in advance

  • 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-21T18:31:45+00:00Added an answer on May 21, 2026 at 6:31 pm

    Your rewriterule doesn’t allow the dot character… If you want something.php to match, use this:

    ^([a-zA-Z0-9-/.]+)$

    I’ve also simplified the fact there could be a trailing slash: since the slash is already allowed, a trailing slash will match as well.

    Don’t forget to add some rewriteconds to avoid rewriting existing directories or files:

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    

    Btw, Adding a php extension to rewritten URLs doesn’t make any sense and you should stick to clean URLs with no extension at all.

    So you end up with somehting like this:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^([-/.a-zA-Z0-9]+)$ news.php?url=$1 [QSA,L]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a database that has around 10k records and some of them contain
I have a database that has a table email_eml that stores 3 attributes name_eml,
I have a database that has 16 tables, but only four are relevant to
I have a database that has the following columns: ------------------- id|domain|hit_count ------------------- And I
I have a database that has node & nodetype tables. Nodes table NodeID ParentNodeID
I have a mysql database that has text stored in it with non encoded
I have a SQL database that has a table with a field set to
I have inherited a database that has a lot of cursors in it, and
I have a database table that has a Unique Key constraint defined to avoid
I have a SQL database that has the following table: Table: PhoneRecords -------------- ID(identity

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.