.htaccess to remove .PHP extension (Godaddy)
I have tried to remove the .php extension and nothing seems to work.

First, here is what I am trying to accomplish:

    Current URL: www.example.com/something.php
    Desired  URL: www.example.com/something

Second, here is what I have in my .htaccess file:

    Options -MultiViews
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php
        RewriteRule (.*)\.php$ /$1/ [L,R=301]
    
        RewriteRule (.*)/$ $1.php [L]
    </IfModule>

Lastly, here is the issue:

Instead of getting www.example.com/something I get www.example.com/something/ and my pages can no longer find their css, js or image files. Also when I click an internal link it changes my url to www.example.com/something/link and it will keep adding to the url as I click through the page until I get something like this: www.example.com/something/link/link2/something/link1/something

The goal here is to just remove the .php file extension to the public as mentioned above.


Thanks,
Ben  
.htaccess to remove .PHP extension (Godaddy)
===

I have tried to remove the .php extension and nothing seems to work.

First, here is what I am trying to accomplish:

    Current URL: www.example.com/something.php
    Desired  URL: www.example.com/something

Second, here is what I have in my .htaccess file:

    Options -MultiViews
    
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteCond %{THE_REQUEST} ^GET\ /[^?\s]+\.php
        RewriteRule (.*)\.php$ /$1/ [L,R=301]
    
        RewriteRule (.*)/$ $1.php [L]
    </IfModule>

Lastly, here is the issue:

Instead of getting www.example.com/something I get www.example.com/something/ and my pages can no longer find their css, js or image files. Also when I click an internal link it changes my url to www.example.com/something/link and it will keep adding to the url as I click through the page until I get something like this: www.example.com/something/link/link2/something/link1/something

The goal here is to just remove the .php file extension to the public as mentioned above.


Thanks,
Ben  