MyBB Community Forums

Full Version: how to remove .php extension
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I dont wanna have the .php in the end of the URL of my Website.
How can i remove or disable it?  Huh
Hello,

Add this code to your .htaccess file

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

Now to link to the page it should look like

<a href="http://whatever.com/name" title="name">Name</a>
(2017-10-21, 08:32 PM)Brian. Wrote: [ -> ]Hello,

Add this code to your .htaccess file

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

Now to link to the page it should look like

<a href="http://whatever.com/name" title="name">Name</a>

Thank you for ur awnser.



If im trying to visit the page without .php at the end it says:

Not Found
The requested URL /memberlist was not found on this server.

Apache/2.4.10 (Debian) Server at gtaem.ml Port 80

My .htaccess file is located at: /var/www/html
And it have permissions: 777
Still dont work. Can you help me?

My Website: http://gtaem.ml
Add the .htaccess to your forum root

/forum/

That should work.
(2017-10-21, 08:43 PM)Brian. Wrote: [ -> ]Add the .htaccess to your forum root

/forum/

That should work.

My whole forum is located at: /var/www/html
So i dont have an /forum/ dir