Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

silly RewriteRule problem

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Enabling http PUT  
Author Message
bastiang

External


Since: May 16, 2004
Posts: 3



(Msg. 1) Posted: Thu May 05, 2005 6:55 pm
Post subject: silly RewriteRule problem
Archived from groups: alt>apache>configuration (more info?)

hi ng,

i'm very desperate about the following prob.

two simple rules of for my site:


RewriteRule news_([0-9]+)\.html$ news.html?nid=$1 [QSA,N]
RewriteRule ([a-zA-Z0-9_]+)\.html$ index.php?id=$1 [QSA,L]

rule 2 goes its way, but the first one 's my little problem.

why doesnt it rewrite news_1234.html to news.html?nid=1234, which should
then be captured by the second rule?

all i got is a [notice] child pid 25000 exit signal Segmentation fault (11)

any help welcome.


regards,
Bastian

 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 2) Posted: Thu May 05, 2005 9:55 pm
Post subject: Re: silly RewriteRule problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bastian Gorke" <bastiang.TakeThisOut@yahoo.com> schreef in bericht
news:d5e433$qrp$05$1@news.t-online.com...
 > RewriteRule news_([0-9]+)\.html$ news.html?nid=$1 [QSA,N]
 > RewriteRule ([a-zA-Z0-9_]+)\.html$ index.php?id=$1 [QSA,L]
 > rule 2 goes its way, but the first one 's my little problem.
 > why doesnt it rewrite news_1234.html to news.html?nid=1234, which should
 > then be captured by the second rule?
 > all i got is a [notice] child pid 25000 exit signal Segmentation fault
(11)
The N flag is prone to enless loops ... try PT

Not too much of a clue

HansH<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
bastiang

External


Since: May 16, 2004
Posts: 3



(Msg. 3) Posted: Fri May 06, 2005 6:55 am
Post subject: Re: silly RewriteRule problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"HansH" <hans.DeleteThis@niet.op.het.net> schrieb
 > "Bastian Gorke" <bastiang.DeleteThis@yahoo.com> schreef

  >> RewriteRule news_([0-9]+)\.html$ news.html?nid=$1 [QSA,N]
  >> RewriteRule ([a-zA-Z0-9_]+)\.html$ index.php?id=$1 [QSA,L]

  >> rule 2 goes its way, but the first one 's my little problem.
  >> why doesnt it rewrite news_1234.html to news.html?nid=1234, which should
  >> then be captured by the second rule?
  >> all i got is a [notice] child pid 25000 exit signal Segmentation fault
 > (11)

 > The N flag is prone to enless loops ... try PT

sorry, no point for this Sad the browser brings up a page not found error, or
trys to download a empty document (last one is opera).

any other ideas?

regards, bastian<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
Jim Hayter

External


Since: Feb 07, 2005
Posts: 81



(Msg. 4) Posted: Fri May 06, 2005 10:22 am
Post subject: Re: silly RewriteRule problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Fri, 6 May 2005 12:09:12 +0200, in alt.apache.configuration,
"Bastian Gorke" <bastiang RemoveThis @yahoo.com> wrote:

<snip>
 >sorry, no point for this Sad the browser brings up a page not found error, or
 >trys to download a empty document (last one is opera).
 >
 >any other ideas?
 >

Set RewriteLogLevel to 5 or so and look at the rewrite log to see what
is happening. This is the best way I've found to diagnose strange
rewrite problems.

HTH,
Jim<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
leendert

External


Since: Nov 23, 2004
Posts: 20



(Msg. 5) Posted: Fri May 06, 2005 11:55 am
Post subject: Re: silly RewriteRule problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Thu, 05 May 2005 23:44:10 +0200, Bastian Gorke wrote:
 >
 > RewriteRule news_([0-9]+)\.html$ news.html?nid=$1 [QSA,N]
 > RewriteRule ([a-zA-Z0-9_]+)\.html$ index.php?id=$1 [QSA,L]
 >
 > why doesnt it rewrite news_1234.html to news.html?nid=1234, which should
 > then be captured by the second rule?
 >

Two things:

1. Do these rules apply to more than 1 directory? If there will not be
anything in front of news_*.html, make sure to start with a carrot (^)
sign: eg. ^news_([0-9]+)\.html$
2. I think the first rule should have a LAST flag, because now after being
rewritten, it will be rewritten again by the second rule. As you can see,
the URI "news.html" matches ([a-zA-Z0-9_]+)\.html$.


-leendert bottelberghs<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
hans1

External


Since: Mar 29, 2004
Posts: 672



(Msg. 6) Posted: Fri May 06, 2005 2:55 pm
Post subject: Re: silly RewriteRule problem [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Bastian Gorke" <bastiang.TakeThisOut@yahoo.com> schreef in bericht
news:d5ffno$k49$05$1@news.t-online.com...
 > "HansH" <hans.TakeThisOut@niet.op.het.net> schrieb
  > > "Bastian Gorke" <bastiang.TakeThisOut@yahoo.com> schreef
   > >> RewriteRule news_([0-9]+)\.html$ news.html?nid=$1 [QSA,N]
   > >> RewriteRule ([a-zA-Z0-9_]+)\.html$ index.php?id=$1 [QSA,L]
   > >> rule 2 goes its way, but the first one 's my little problem.
   > >> why doesnt it rewrite news_1234.html to news.html?nid=1234, which
should
   > >> then be captured by the second rule?
   > >> all i got is a [notice] child pid 25000 exit signal Segmentation fault
  > > The N flag is prone to enless loops ... try PT
 > sorry, no point for this Sad the browser brings up a page not found error,
or
 > trys to download a empty document (last one is opera).
If PT keeps the rule(s) from looping, where looping is the assumed cause of
the segment fault, apache just might be able to properly serve a page.

HansH<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: silly RewriteRule problem 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
A silly question.... - off_topic, I know.... sorry. I've been reading Apache/Linux/PHP/ docs all day now, and I've learned a lot. But one thing has me puzzled more than any of the technical issues: What do the words 'foo' and 'bar' mean and why are they used EVERYWHERE..

CGI Problem - Dear Friends, Since downloading/installing the new Apache 2.0.52 version (and I've been away from this for a year now), I have the following problem (while working locally with 127.0.0.1 on a WinXP machine) in my office: I have in my..

another php problem - I to had a problem with php not running on apache2. I tryed the LoadModule php4_module "i:/php-4.3.6-win32/sapi/php4apache2.dll" AddType application/x-httpd-php .php at php.net now apache won't start I saw a message about php4ts.dll should ...

cgi-bin problem - I am running Apache 1.3.14 on Win 98. PHP & Perl are installed and are running correctly. The directory structure is C:/Perl C:/apache/www/cgi-bin C:/apache/www/...<other files and directories> My problem is this: I am trying to use a p...

ssi problem - I was trying to enable ssi on my apache web server. I've edited httpd.conf and add these lines: AddType text/html .shtml AddHandler server-parsed .shtml <font color=purple> ; Options +Includes</font> Despite of this, a...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]