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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:45:21+00:00 2026-05-27T00:45:21+00:00

how properly can I hide .php extensions form my url : example: www.example.com/index.php to

  • 0

how properly can I hide .php extensions form my url : example:

www.example.com/index.php

to

www.example.com/index

My .htaccess file content is:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php

And it is not working although phpinfo() shows that mod_rewrite is in “Loaded Modules” section. What’s wrong here?


When I tried to set Authentication:

AuthUserFile /usr/home/vesa/.htpasswd
AuthGroupFile /dev/null
AuthName Somewhere Neat
AuthType Basic

<Limit GET POST>
require user vesa
</Limit>
enter code here

It asked for username and password. Therefore I assume that .htaccess files are processed by server. Right?


When I try to add

Options +FollowSymlinks

I get 500 Internal Server Error


When I add RewriteRule (.*)\.asp $1.php it successfully changes any .asp extension to .php


When I use RewriteRule it just redirects my browser to another file. So in case if I will try to hide extension it should redirect me to file with no extension – in which case I will get error because there is no such file exists. What is the simplest way to make mod_rewrite “hide” (write url filenames without extension .php) while linking to .php files?

  • 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-27T00:45:22+00:00Added an answer on May 27, 2026 at 12:45 am

    Probably, there is some configuration set that allows (for .htaccess file) to redirect to any file, it is basically rewrite URL, but in the same time it is not allowing Options +FollowSymlinks. I’m not familiar with php config file, but i am sure system administrators knows what is going on.

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

Sidebar

Related Questions

Can someone provide a simple example of how to properly use Html.RadioButtonFor? Let's say
Can somebody please explain how android.app.ProgressDialog is properly used. Since, when I call hide()
I use asp:Login control, user can login properly, but while checking user Profile information
Can IDataError info be used properly in a winforms application? In the past I
How can I check whether all JavaScript functions have loaded properly on a page?
How can I tell if my call to SendInput is working properly? I have
I can't figure out why this list is not displaying properly in IE7. The
I can't for the life of me figure out how to do this properly.
I hope I can explain this properly. I'm using flashDevelop for an avatar creation
Short story: I can't make precompiled headers work properly with gcc -c option. Long

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.