Problem Solved
Hello,
I`m trying to rewrite some urls.On my localhost they are working fine, but after i upload them on server they are not working.
Here is the php code:
while ($query = mysql_fetch_array($result)) {
$title = htmlspecialchars($query["title"]);
$id = $query["id"];
$category = $query["category"];
$seo_title = str_replace(" ","-",$title);
$seo_title = str_replace("&","and",$seo_title);
$seo_category = str_replace(" ","-",$category);
$seo_category = str_replace("&","-and-",$seo_category);
$seo_category = str_replace("&","-and-",$seo_category);
$seo_category = str_replace("/","-and-",$seo_category);
$seo_category = str_replace("::","/",$seo_category);
the code on URL:
<a href="<?php print $seo_category; ?>/<?php print $seo_title; ?>-download-<?php print $id; ?>.html"><?php print $title;?></a>
and the .htaccess file:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule -(\d*).html$ soft.php?id=$1
this is the error i get on server:
Not Found
The requested URL /Folder/The-Category/Sub-category/Some-File-download-1.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
The "Folder" folder really exists, categories and subcategories are in .txt file.
Could somebody please help?