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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:06:27+00:00 2026-06-13T16:06:27+00:00

So I want the usual thing from the .htaccess file. www.example.com/article.php?title=my_title should be replaced

  • 0

So I want the usual thing from the .htaccess file. http://www.example.com/article.php?title=my_title should be replaced with http://www.example.com/article/my_title, however I cannot seem to get it to work. As of right now I can get the .php to drop and I suspect that might be some of the problem. (also I get http://example.com to go to http://www.example.com) Here is my .htaccess file

Options +FollowSymLinks -MultiViews 
rewriteengine on

## this is the piece that is not working
RewriteRule ^title/(.*) article.php?arr=title/$1

rewritecond %{HTTP_HOST} ^example.com$
rewriterule ^example\/(.*)$ "http\:\/\/www\.example\.com\/$1" [R=301]

RewriteBase /

## Hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,L,NC]

## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [L]

## Error document (needs to have a 404 page created)
ErrorDocument 404 http://www.example.com/
  • 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-13T16:06:29+00:00Added an answer on June 13, 2026 at 4:06 pm

    You need to add these specific routing rules before any rules that generally apply to php files. So just under your rewriteengine on, add:

    RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s/article\.php\?title=([^&\ ]+)
    RewriteRule ^ /article/%1? [L,R=301]
    
    RewriteRule ^/?article/(.*)$ /article.php?title=$1 [L]
    

    Then the rest of your rules.

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

Sidebar

Related Questions

Want to run javascript function from parent window in child window Example I have
I want to redirect only stacktrace of uncaught exception from console to log file.
I want to make preview button as usual form button next to submit button(as
I want to invoke a selector of a method that has the usual NSError**
I want to comment several lines in my .vimrc, the usual way I do
want to open pdf file when a user clicks on hyperlink shown in gridview
Want to open firefox from terminal at linux with firebug enabled // Terminal $
I'm using a script which replaces the usual file upload input with whatever image
I can't seem to open and write to a text file from my CGI
I want to draw tiled images and then transform them by using the usual

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.