Jump to content

Recommended Posts

Posted

I have tried many codes in .htaccess file that will make file extension hidden. But all of that is not working as expected. When i have saved the code, and i am trying to access it and the result either error 500 or redirecting to index page again.

Please anyone help me

i will thankful for this . .

Posted

Try this code:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

This shows .php files without extension.

When accessing the correct file you can for example block the access or redirect it.

Which code did you use?

Posted

I am sorry i can't replying sooner.

Ok this problem was solved.

Simply just adding multyviews

thank you so much guys!

Its working perfectly! :D

Posted

Hi,

but please can you tell me how to redirect users to the file which its extension was hidden?

Example, if user visit http://my.site/test.php, they will be redirected to http://my.site/test ?

 

The one thing i am afraid about that maybe search engines will indexing both url then marking my site as spam or whatever.

Please help,,

thank you..

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...