Page 1 of 1
rewrite function
Posted: Sun 8. Feb 2004, 19:26
by Jan212
mahlzeit kollegen,
folgendes Problem tut sich momentan bei mir auf.
will die url rewrite funktion nutzen. (was allerdings noch nicht das wirkliche problem ist
)
Meine apache/conf/httpd.conf hat folgenden aufruf:
Code: Select all
LoadModule rewrite_module modules/mod_rewrite.so
Habe folgendes in der .htaccess
Code: Select all
php_flag magic_quotes_gpc Off
php_flag register_globals Off
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
und die rewrite function in der inc_front/front.func.inc
Code: Select all
So um die Zeile 1084
//Rewrite functions
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);
}
Wenn ich jetzt über mein Menü das grafisch ist und mit links wie index.php?anfahrt für die kategorien belegt ist, eine kategorie aufrufe wie:
phpwcms/anfrage.html ist zwar die alias übergabe in die url korrekt, allerdings jedesmal
404 - objekt net gefunden
Wo liegt der Fehler?
Danke für jede Hilfe....
hightere Grüße, Jan
---------------------------------------------------
HILFE ICH HABE VOGELGRIPPE...piep <(' ~
Check mal, ob mod_rewrite auf dem Server installiert, bzw. r
Posted: Mon 9. Feb 2004, 13:07
by eflexer
Code: Select all
<?php
if (!empty($check_mod_rewrite)) {
$rewrite_result = 1;
} else {
$rewrite_result = 0;
}
if ($rewrite_result == 1) {
$result = "Mod_Rewrite is successfully installed!";
} else {
$result = "Mod_Rewrite is either not installed or is not configured properly!";
}
echo $result;
?>
[/code]
Ciao
Thomas
Posted: Mon 9. Feb 2004, 13:28
by sporto
Can someone help explain this to me in English? I'm having a hard time getting my rewrite to work and I need all the help I can get. By the way, I tried the automated free web-based translators and I got this...
"Meal killed, does itself following problem momentarily with me up. Wants the urls rewrite function use. (what to be sure not yet the actual problem is) my apache/conf/httpd. conf has following proclamation:"
Posted: Mon 9. Feb 2004, 15:17
by Jan212
Hallo zusammen,
script ausgeführt, dankeschön...
Mod_Rewrite is either not installed or is not configured properly!
Aber der Aufruf ist da, das Modul anscheinend nicht.
Hat einer nen Tutorial für folgende Umgebung:
Apache/2.0.48
(Win32) /PHP/4.3. ???
Ansonsten luer ich jetzt mal. Danke Thomas.
-----------------------------------------------------------------
English translation follows.
-----------------------------------------------------------------
Posted: Mon 9. Feb 2004, 15:38
by Jan212
Kriege das nicht auf die Reihe das mod_rewrite funzt nicht. Habe den Aufruf in der httpd.conf, das mod_rewrite.so in der apache/modules un den aufruf wie oben in der .htaccess.
trotzdem immer wieder:
Mod_Rewrite is either not installed or is not configured properly!
wo sind weitere Einträge etc. ?
--------------------------------------------------------------------------
Wer kennt sich mit Apache und mod_rewrite aus?
--------------------------------------------------------------------------
Danach könnte man auch mal ein zweisprachiges tutorial zu dem thema releasen/ mit dem alias bugfix (falls das nicht schon gefixt wurde).
(würde das machen, vorraussetzung das funzt bei mir)
--------------------------------------------------------------------------
Posted: Wed 11. Feb 2004, 16:01
by Jan212
HHHHHHHHHHHIIIILLLLLLLLLLLLLFFFFFFFFFFEEEEEEEEEEEE........
Ist hier denn keiner der sich mit mod_rewrite und apache auf win32 auskennt? bitte antworten
--------------------------------------------------
HHHHHHHHHHHHEEEEEEEEEEEEEEEELLLLLLLLLLLLLLLPPPPPPPPPPPPPPPPP
Advanced mod_rewrite/ Apache support needed. who knows the bug c-ontest
plz reply
-------------------------------------------------
Jan der
ierte
Posted: Fri 27. Feb 2004, 16:06
by pixelpeter
Kleiner Tipp wie ich s bei mir gemacht habe
W2K, Apache 1.3.29, php 4.3.1, phpwcms 1.1-RC2 2004-02-20
phpwcms liegt bei mir in einem Unterverzeichnis:
http://www.example.com/phpwcms/
Mit folgender Regeln in der .htaccess (im Verzeichnis "/phpwcms") funkts:
RewriteEngine on
RewriteBase /phpwcms
RewriteRule ^(.*)\.html$ /phpwcms/index.php?id=$1
Posted: Sat 28. Feb 2004, 00:31
by cmslover
Summary, is it working yet with the re-write mode? Could phpwcms generate search engine friendlier URL such as
http://www.domain/book instead of domain/index?id=0,1,2,3,4 yet?
These kind of posting are very helpful, please post in English so we all can benefit from it. Thank you all very much!!!
Posted: Sat 28. Feb 2004, 08:59
by DeXXus
With the rules posted in other threads, phpWCMS has been generating SE "friendlier" URL's such as "domain/phpwcms/1.7.0.0.1.0.html" for some time now. I think the "current" problem is with those using "alias" function and also the WYSIWYG editor file dialogs. That's all I have heard
Posted: Sat 28. Feb 2004, 14:45
by Jan212
hi pixelpeter,
werde das mal testen...
bis dann
Jan
Posted: Sat 28. Feb 2004, 20:58
by Jan212
JJJJJJJJJJJJJJJAAAAAAAAAAAAAAAAAAAAAAAAA- funzt. zumindest teilweise... year baby... ich teste mal durch und poste dann erneut...
PIXELPETER FOR PRESIDENT...