Skip to content
Advertisement

Remove .php from URL

Ubuntu 14.04LTS 32bit

LAMP

I know it’s an old question but..

I need it to remove .php anywhere it finds it from the visible url. It needs to work with /showthread.php?id=XX —> /showthread?id=XX

I can’t even get it to work with /page.php –> /page. I’ve tried these:

Remove .php extension with .htaccess

How to hide the .html extension with Apache mod_rewrite

Remove .php from urls with htaccess

How to stop .htaccess loop

It just does nothing at all. While other .htaccess code works fine..

While

JavaScript

Lists mod_rewrite in Loaded Modules

And

JavaScript

Returns Module Available

Tried many more things

JavaScript

#

JavaScript

#

JavaScript

Not even this has any effect whatsoever:

JavaScript

sudo service apache2 restart does not change anything.

Server reboot changes nothing.

I tried clearing other code inside, did not make any change.

I cleared my browser cache 100 times

I’m starting to think that it just hates me. What could possible be causing this??

Advertisement

Answer

Hope helped.

It’s worked for me.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement