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..

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...