I have a client project in production (locaweb then n has cpanel: |) and I have a news page and I need to leave it with a friendly URL, page noticia.php has the following code:
How do I leave a page and need to leave it with a friendly URL. The page noticia.php
, and has the following code:
$urlpath = $_SERVER['PATH_INFO'];
$urlpath = $_SERVER['PATH_INFO'];
$paths = explode('-', $urlpath);
$paths = explode('-', $urlpath);
$i_item = end($paths);
$i_item = end($paths);
It takes the '/ titulo-da-noticia-00', 00 that would be the ID of the news, I need the URL ' link 'can also be accessed by' link '
The .htaccess
current is like this:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
But when I access the hosting I get the following error message:
HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.