Seite 1 von 1

Problem mit der Url und darstellung

Verfasst: 16.07.2009 19:14
von maxxe
Ich hab hier folgendes für meine Seite geschrieben


.htaccess

RewriteEngine On
RewriteBase /Core

RewriteRule ^profile/(.*)_([0-9]*).html$ profile.php?lookup=$2 [L]
bsp: http://meineseite.de/profile/maxxe_9.html


Link (SEO) mit dem das Profile aufgerufen wird

<a href='".BASEDIR."profile/".seoname($data['user_name'])."_".$data['user_id'].".html' class='side'>".$data['user_name']."</a>



Seoname.php

<?
function seoname($seoit) {
// $seoit = strip_tags($seoit);
$seoit = str_replace('=',' ',$seoit);
$seoit = str_replace('/',' ',$seoit);
$seoit = str_replace('\\',' ',$seoit);
$seoit = str_replace('@',' ',$seoit);
$seoit = str_replace('~',' ',$seoit);
$seoit = str_replace('!',' ',$seoit);
$seoit = str_replace('£',' ',$seoit);
$seoit = str_replace('?',' ',$seoit);
$seoit = str_replace('!',' ',$seoit);
$seoit = str_replace('$',' ',$seoit);
$seoit = str_replace('%',' ',$seoit);
$seoit = str_replace('^',' ',$seoit);
$seoit = str_replace('*',' ',$seoit);
$seoit = str_replace('_',' ',$seoit);
$seoit = str_replace('{',' ',$seoit);
$seoit = str_replace('}',' ',$seoit);
$seoit = str_replace('[',' ',$seoit);
$seoit = str_replace(']',' ',$seoit);
$seoit = str_replace('-',' ',$seoit);
$seoit = str_replace(' & ',' ',$seoit);
$seoit = str_replace('"',' ',$seoit);
$seoit = str_replace('.',' ',$seoit);
$seoit = str_replace('\'',' ',$seoit);
$seoit = str_replace(',',' ',$seoit);
$seoit = str_replace(' ','-',$seoit);
$seoit = str_replace(' ','-',$seoit);
$seoit = str_replace(' ','-',$seoit);
$seoit = str_replace(':','',$seoit);
$seoit = str_replace('#','',$seoit);
$seoit = str_replace('(','',$seoit);
$seoit = str_replace(')','',$seoit);
$seoit = str_replace('---','-',$seoit);
$seoit = str_replace('--','-',$seoit);
$seoit = strtolower($seoit);
return $seoit;
}
?>



Wenn ich jetzt auf den link klicke erscheint zwar meine Seite aber das Template wird nicht angezeigt also css farben bilder etc.

Aber wenn ich das ganze wie folgt schreibe

ohne / aber mit _ nach profile dann wird alles normal angezeigt. bsp: http://meineseite.de/profile_maxxe_9.html

kann mir jemand sagen was ich da falsch mache

RewriteEngine On
RewriteBase /Core

RewriteRule ^profile_(.*)_([0-9]*).html$ profile.php?lookup=$2 [L]



Link (SEO) mit dem das Profile aufgerufen wird

<a href='".BASEDIR."profile_".seoname($data['user_name'])."_".$data['user_id'].".html' class='side'>".$data['user_name']."</a>



mfg maxxe

Verfasst: 17.07.2009 09:07
von Gumbo
Gib externe Ressourcen durch absolute URL-Pfade oder gleich absolute URLs an.

Verfasst: 17.07.2009 11:16
von maxxe
Ich versteh jetzt nicht ganz was du damit meinst kannst du mir es mal anhand eines beispiels demonstrieren?


gruß maxxe

Verfasst: 17.07.2009 20:19
von Gumbo
Relative URLs werden von einer Basis-URL aus aufgelöst, die – falls nicht anders angegeben – die URL des aktuellen Dokuments ist. Das heißt, ein „foo/bar“ würde zwar in „/baz“ zu „/foo/bar“ aufgelöst werden, in „/baz/quux“ jedoch zu „/baz/foo/bar“. Der absolute URL-Pfad „/foo/bar“ hingegen würde immer zu „/foo/bar“ aufgelöst, sowohl bei „/baz“ als auch „/baz/quux“. (Gleiches gilt für relative und absolute URLs im Allgemeinen.)

Verfasst: 21.08.2009 14:20
von maxxe
aha. verstehe ich leider nicht :?

kannst du mir es vllt anhand meines codes demonstrieren?




mfg
maxxe