URL friendly with Boilerplate

3

I'm using Boilerplate to have a base template for use. But I'm trying to use friendly URLs in it, but I can not .. I've tried several codes, the latest is this:

 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME}\.php -f
 RewriteRule ^(.*)$ $1.php'

Here is the content of my .htacess link

But I'm not getting satisfactory results! I just want to remove the .php extension from my links ...

    
asked by anonymous 22.03.2014 / 18:06

1 answer

2

Have you activated mod_rewrite.c?

If so. In the site (root) folder, create a file called:

.htaccess :

   Options +FollowSymlinks
   RewriteEngine On
   RewriteBase /
   RewriteCond %{REQUEST_FILENAME} !-f
   RewriteCond %{REQUEST_FILENAME} !-d
   RewriteCond %{REQUEST_FILENAME}.php -f
   RewriteRule ^(.+)$ /$1.php [L,QSA]

Enabling mod_rewrite :

  • Opens the file httpd.conf , search for mod_rewrite.so , and uncomment by removing # at the beginning of the line.

  • Search for AllowOverride None and rename to AllowOverride All .

  • 22.03.2014 / 19:36