I'm trying to get friendly urls with test.php in the root directory with these settings:
System settings:
Enable friendly URLs: yes
File extension: html
Prefix: /include/news_en/
Directory filename: index.html
htaccess file in my /include/news_en/ directory:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /include/news_en/index.php [L]
htaccess file in my root / directory:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /test.php [L]
code in my test.php file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Document sans titre</title>
<link href="images/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
include 'include/news_en/index.php';
#example 'news/index.php';
?>
</body>
</html>
THE RESULT on test.php
Can't connect to MySQL server on 'localhost' (10061)
I dont understand becose http://www.mescasinos.net/include/news_en/index.php is working.. and i can connect to the admin panel, add news etc.. the script is able to connect to the database, why not with test.php ??
If I write many news, and i transfert all after and turn FirendlyURLs on, is the old news written will be active or only NEW news will be Friendly URLs ??
Access: Admin
Total Posts: 1395
Joined: 2006-05-19
Friendly URLs can be disabled and enabled again without causing any problems. If you write your news now then enable friendly URLs later on it'll still work fine.