Hello,
I now have a bit of testing and some other links with mod_rewrite changed such as: contact.html and so forth. But a setting is not accepted it with the self-created templates to be done.
Here again what I did.
---
Hallo zusammen,
ich habe nun ein wenig getestet und einige weitere Links mit mod_rewrite geändert wie zum Beispiel: contact.html und so weiter. Aber eine Einstellung wird nicht übernommen es hat mit den selbst erstellten templates zu tun.
Hier einmal was ich gemacht habe.
Im Open: includes/session.php
Search:
elseif (strstr($url, 'lightbox.php')) {
add before:
elseif (strstr($url, 'index.php?template=about_us')) {
if (strstr($url, 'page=')) {
preg_match('#page=([0-9]+)&?#', $url, $matches);
if (isset($matches[1])) {
$split = explode('?', $url);
$url = $split[0];
$query = @$split[1];
$url = str_replace('index.php?template=about_us', 'aboutus.'.$matches[1].'.htm', $url);
$query = str_replace('page='.$matches[1].'&', '', $query);
$query = str_replace('&page='.$matches[1], '', $query);
$query = str_replace('page='.$matches[1], '', $query);
if (!empty($query)) {
$url .= '?' . $query;
}
}
}
else {
$url = str_replace('index.php?template=about_us', 'aboutus.htm', $url);
}
}
Im Open .htaccess
Search:
RewriteRule ^lightbox\.([0-9]+)\.htm$ lightbox.php?page=$1&%{QUERY_STRING}
add after:
RewriteRule ^aboutus\.htm$ index.php?template=about_us?%{QUERY_STRING}
RewriteRule ^aboutus\.([0-9]+)\.htm$ index.php?template=about_us?page=$1&%{QUERY_STRING}
But that does not work. There must be something else?
The works here but also that runs at me:
-----
Aber das klappt nicht. Muss da etwas anders eingestellt werden?
Das hier klappt aber auch, dass läuft bei mir:
RewriteRule ^kontaktformular\.htm$ support.php?action=newticket?%{QUERY_STRING}
RewriteRule ^kontaktformular\.([0-9]+)\.htm$ support.php?action=newticket?page=$1&%{QUERY_STRING}
and
elseif (strstr($url, 'support.php?action=newticket')) {
if (strstr($url, 'page=')) {
preg_match('#page=([0-9]+)&?#', $url, $matches);
if (isset($matches[1])) {
$split = explode('?', $url);
$url = $split[0];
$query = @$split[1];
$url = str_replace('support.php?action=newticket', 'kontaktformular.'.$matches[1].'.htm', $url);
$query = str_replace('page='.$matches[1].'&', '', $query);
$query = str_replace('&page='.$matches[1], '', $query);
$query = str_replace('page='.$matches[1], '', $query);
if (!empty($query)) {
$url .= '?' . $query;
}
}
}
else {
$url = str_replace('support.php?action=newticket', 'kontaktformular.htm', $url);
}
}
That goes without problems, but that with "index.php? Template =" this is not.
---
Das klappt ohne Probleme, aber das mit "index.php?template=" das geht nicht.
I also wish that from index.php, will start.htm. Can this be accomplished?
---
Ich möchte auch, dass aus index.php, start.htm wird. Kann man das bewerkstelligen?
[EDIT by V@no]
Don't use [php][/php] tags for non-PHP code, it doesn't display correctly.