rewrite function

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

rewrite function

Post 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

:idea: Wo liegt der Fehler?
Danke für jede Hilfe....

hightere Grüße, Jan
---------------------------------------------------
HILFE ICH HABE VOGELGRIPPE...piep <(' ~
eflexer
Posts: 17
Joined: Thu 22. Jan 2004, 13:29

Check mal, ob mod_rewrite auf dem Server installiert, bzw. r

Post 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
sporto
Posts: 160
Joined: Mon 10. Nov 2003, 18:01
Location: USA, Chicago

Post 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:"
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

Hallo zusammen,
script ausgeführt, dankeschön...
:arrow: Mod_Rewrite is either not installed or is not configured properly!
:cry:
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.
-----------------------------------------------------------------
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post 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?
--------------------------------------------------------------------------
:arrow: 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)
--------------------------------------------------------------------------
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post 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 :shock: ierte
pixelpeter
Posts: 45
Joined: Fri 27. Feb 2004, 16:00

Post 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
cmslover
Posts: 86
Joined: Wed 18. Feb 2004, 16:17
Location: USA, Georgia, Atlanta
Contact:

Post 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!!!
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post 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 :?
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

hi pixelpeter,
werde das mal testen...
bis dann

Jan
Jan212
Posts: 859
Joined: Wed 28. Jan 2004, 21:38
Location: Solingen
Contact:

Post by Jan212 »

JJJJJJJJJJJJJJJAAAAAAAAAAAAAAAAAAAAAAAAA- funzt. zumindest teilweise... year baby... ich teste mal durch und poste dann erneut...
PIXELPETER FOR PRESIDENT...
Regards/ Grüsse/ Groetjes - JAN212
------------------------------------------------
null212 - Büro für Kommunikation und Design
------------------------------------------------
Lyrikfetzen des Tages
1. Ist der Quelltext auch valide fragt Herr Müller ganz perfide.
2. Wat is dat een lekker ding.
3. Wer Vision hat soll zum Arzt gehen.
------------------------------------------------
Post Reply