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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T14:03:56+00:00 2026-06-05T14:03:56+00:00

I am trying to remove php extension from url, But its not working for

  • 0

I am trying to remove php extension from url, But its not working for me. I am using Windows 7, with apache2.2.17 and php5.3. Now I have configured it as

in .htaccess file

OPTIONS -Indexes
IndexIgnore *

Options +FollowSymLinks

RewriteEngine On
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) $1\.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R=301,L]

in httpd.conf enabled mod_rewrite as

LoadModule rewrite_module modules/mod_rewrite.so

and

<Directory "D:/Apache/htdocs">
    Options Indexes FollowSymLinks ExecCGI MultiViews
    AllowOverride all
    Order allow,deny
    Allow from all
</Directory>

in php.ini

expose_php = On

After making these configuration still i am not able to remove php extension from url in my windows machine but same thing is working in ubuntu server.

Is there anything I am missing here?

  • 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-05T14:03:58+00:00Added an answer on June 5, 2026 at 2:03 pm

    This might answer your question:

    RewriteRule ^/([^-]*)$ /$1.php

    It works for root catalog.

    RewriteRule ^catalog/([^-]*)$ catalog/$1.php

    Or you can write automatic script:

    RewriteRule ^/([^-])/([^-])$ /$1/$2.php

    But this is for “httpd.conf” file.

    Where: ([^-]*) means variable; $1, $2 means converted to variable i.e.

    http://www.verity.com/foo/bar => verity.com/foo/bar.php

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

Sidebar

Related Questions

So I am trying to remove index.php from address using this manual: http://dev.lohv.eu/1/user_guide/general/urls.html Atm
i'm trying to remove a child node from an xml. my script is working..but
I am trying to remove .php from my urls and so I am using
I was trying to remove index.php from the URL of a Magento website: _Turn
I'm trying to connect to remote MySQL server with SSL from PHP using mysql_connect:
I'm trying to remove the 'index.php' from CI Urls. I've tried many solutions, none
I'm trying to remove all BBCode Tags from a string. [url]www.google.com[/url] becomes www.google.com I
I'm trying to remove all white space and code comments from my .php files
I am trying to remove transparent areas of an image with php using imagick.
I'm currently working with progress bars for form uploads using the PHP uploadprogress extension.

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.