GIDForums  

Go Back   GIDForums > Web Hosting Forums > Apache Web Server Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 08-Aug-2004, 00:18
Maschenka Maschenka is offline
New Member
 
Join Date: Aug 2004
Posts: 2
Maschenka is on a distinguished road

Possible bug for ModRewrite in Apache/Windows?


Good morning!

I have recently started with ModRewrite in order to make my pages more friendly towards search engines. First of all: When uploaded to my ISP everything works fine.

But when I try using it at home (WAMP installation, Windows, Apache 1.3.6, MySQL, PHP) I run into problems as the values I have assigned to parameters are not read properly if there is more than one value.

Example:

=== .htaccess ===
RewriteEngine on
RewriteRule ^album/(.*)/(.*)/$ /test.php?cat=$1&album=$2

In principle then
192.168.1.100 should be interpreted as
192.168.1.100

Instead I get an error message, and if I ask for an output of the parameters with
print_r($_GET);
the result is
Array ( [cat] => ealbum/e/4/album=4 )

I have activated RewriteLog, and this is the important bit of the log (added line breaks for better readability):

Code:
add path-info postfix: c:/programme/wamp/homepages/album -> c:/programme/wamp/homepages/album/e/4/ strip per-dir prefix: c:/programme/wamp/homepages/album/e/4/ -> album/e/4/ applying pattern '^album/(.*)/(.*)/$' to uri 'album/e/4/' rewrite album/e/4/ -> /test.php?cat=ealbum/e/4/album=4 split uri=/test.php?cat=ealbum/e/4/album=4 -> uri=/test.php, args=cat=ealbum/e/4/album=4 add path-info postfix: /test.php -> /test.php/e/4/

Can anybody here help me with the interpretation of why it goes wrong?
  #2  
Old 08-Aug-2004, 15:24
Allowee's Avatar
Allowee Allowee is offline
Regular Member
 
Join Date: May 2003
Location: The Netherlands
Posts: 339
Allowee has a spectacular aura about
you are running the latest version of apache and mod_rewite?

did you try with something simple like:
Code:
RewriteEngine on RewriteRule ^(.*)$ /test.php?test=$1
and the var_dump($_GET); in test.php

then just try some thing, if that gives strange results you might to find the mod_rewrite site and see if you can sumbit a bug or ask for support from the author(s)
__________________
Pastebin
PHP Documentation Site
Allowee's Blog http://allowee.net
  #3  
Old 08-Aug-2004, 21:58
Maschenka Maschenka is offline
New Member
 
Join Date: Aug 2004
Posts: 2
Maschenka is on a distinguished road
Quote:
Originally Posted by Allowee
you are running the latest version of apache and mod_rewite?
Apache is 1.3.6, so definitely not the latest version, same with mod_rewrite as it came together with Apache. But as everything else is running fine I would prefer not upgrading it for now as long as it isn't sure this isn't fixable by myself.


Quote:
did you try with something simple like:
Code:
RewriteEngine on RewriteRule ^(.*)$ /test.php?test=$1
and the var_dump($_GET); in test.php
Yes, as I said this error occurs only if there is more than one parameter. And on my ISP's web server also more than one are handed over correctly


Quote:
then just try some thing, if that gives strange results you might to find the mod_rewrite site and see if you can sumbit a bug or ask for support from the author(s)
The complexity in the form on nagoya.apache.org has so far kept me from submitting too many bug database queries, but I guess I will have to go through it.
  #4  
Old 11-Aug-2004, 07:09
JdS's Avatar
JdS JdS is offline
Senior Member
 
Join Date: Aug 2001
Location: KUL, Malaysia
Posts: 3,371
JdS will become famous soon enough
Hello Maschenka,

Did you figure this out yet?

Incase you haven't can you try this pattern instead and see if it helps your situation, it's a long shot but it won't hurt for you to try it.

Code:
RewriteEngine on RewriteRule ^album/([^/]+)/([^/]+)/$ /test.php?cat=$1&album=$2
 
 

Recent GIDBlogFlickr uploads of IA pictures by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 00:57.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.