If i use $phpwcms["rewrite_url"] = 1 then the link with alias doesn't work.
[ID plaetzchen]read news[/ID]
is produce this:
http://localhost:81/etzchen.html
any Ideas?
rewrite rule + alias
did you make a .htacces file?
http://www.studmed.dk Portal for doctors and medical students in Denmark
I have it!!!
in .htacess you write:
RewriteEngine on
RewriteRule ^([a-z]*)\.html$ %{DOCUMENT_ROOT}/index.php?$1
RewriteRule ^(.*)\.html$ %{DOCUMENT_ROOT}/index.php?id=$1
RewriteRule ^index.html$ %{DOCUMENT_ROOT}/index.php
and in include\inc_front\front.func.inc.php
replace the function url_search with this:
in .htacess you write:
RewriteEngine on
RewriteRule ^([a-z]*)\.html$ %{DOCUMENT_ROOT}/index.php?$1
RewriteRule ^(.*)\.html$ %{DOCUMENT_ROOT}/index.php?id=$1
RewriteRule ^index.html$ %{DOCUMENT_ROOT}/index.php
and in include\inc_front\front.func.inc.php
replace the function url_search with this:
Code: Select all
function url_search($query)
{
if(strpos($query, "id")) $noid = substr($query, 4);
else $noid = substr($query, 1);
$file = str_replace(",", ".", $noid).".html"; //further use
//$file = $noid.".html";
$link = "<a href=\"".$file."\"";
return($link);
//unset($link);
}