htaccess not rewriting really well with hiding extension

So I am basically facing this problem with Rewrite. How?

So am trying to hide the:

example.php to /example 

I got that working but now am facing another problem with other extensions. Thy is it rewriting?

WebPlayer.unity3d to WebPlayer.unity3d/

The / at the end I need that removed.

Any help is greatly appreciated. Thank You!

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

Answers


So your .htaccess code looks right to me. What you could try is make a separate .htaccess for the folder WebPlayer.unity3d that does not have the conflicting code.

Good Luck!


Turn off -Multiviews

Try:

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

Need Your Help

Highlight rows using GWT CellTable

gwt highlight celltable

I have created a CellTable with 300+ rows divided into pages of 20. I have a command in my menu that allows the user to highlight rows based on values in some column (similar to conditional formatt...

Why wont my browser recognise php scripts within a html file?

php html .htaccess

I am designing a website that requires me to show the outputs of a mysql database on a webpage written in html. However my browser doesn't seem to recognize the php scripts within the html file and