Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Cherokee: users

Problem underständing rewrite rules

 

 

Cherokee users RSS feed   Index | Next | Previous | View Threaded


s.rissmann at creadoo

Oct 14, 2009, 1:26 AM

Post #1 of 3 (508 views)
Permalink
Problem underständing rewrite rules

Hello,

we just want to switch our Sites from Apache to Cherokee.
For some reasons i need to transfer some .htaccess rules to cherokee.
I've take a look to the cookbook but i dont understand to make the rules we need.

For rewriting the .htaccess looks like this:


RewriteRule index.html index.php [L]
RewriteRule ^Content([1-9][0-9]*).* artikel.php\?id=$1
RewriteRule ^Rezept([1-9][0-9]*).* rezeptartikel.php\?id=$1
RewriteRule ^Familie([1-9][0-9]*).* familienartikel.php\?id=$1
RewriteRule ^Printcontent([1-9][0-9]*).* print.php\?id=$1
RewriteRule ^Registrieren.* anmelden.php
RewriteRule ^AGB.* agb.php
RewriteRule ^Impressum.* impressum.php
RewriteRule ^Datenschutz.* datenschutz.php
RewriteRule ^Bastel-Lexikon.* reviews.php
RewriteRule ^blex([0-9]*).* reviews.php?op=showcontent&id=$1
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/?$ ./index.php?pretty;board=$1;topic=$2.0 [L,QSA]
RewriteRule ^([-_!~*'()$a-zA-Z0-9]+)/([-_!~*'()$a-zA-Z0-9]+)/([0-9]*|msg[0-9]*|new)/?$ ./index.php?pretty;board=$1;topic=$2.$3 [L,QSA]

How to make this work in cherokee.

Thanks in advance

Sven


stefan at konink

Oct 14, 2009, 1:23 AM

Post #2 of 3 (467 views)
Permalink
Re: Problem underständing rewrite rules [In reply to]

On Wed, 14 Oct 2009, creadoo - Sven Rißmann wrote:

> How to make this work in cherokee.

Did you actually make an attempt with the admin interface? And the rewrite
handler? What failed?


Stefan

_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee


stefan at konink

Oct 14, 2009, 6:02 AM

Post #3 of 3 (465 views)
Permalink
Re: Problem underständing rewrite rules [In reply to]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

creadoo - Sven Rißmann schreef:
> OK, for understanding we take this line from .htaccess:
>
> RewriteRule ^Content([1-9][0-9]*).* artikel.php\?id=$1
>
> I've tried the following:
> Add a new Rule in default server:
> Rule Type: Regular Expression
> Regular Expression: ^artikel.php\?$
>
> Then add a Handler for that rule:
> Handler: Redirection
> Type: Internal | Regular Expression: ^Content$ | Substitution:
> artikel.php\?id=$1
>
> So this wont work for me. What is the mistake?

Use the following scheme:

php - extention => fastcgi
fileexist => list&send
default => redirection

At the redirection you do:
^/Content([1-9][0-9]*).* => /artikel.php\?id=$1


I think that should do the trick.


Stefan

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEAREKAAYFAkrVy9EACgkQYH1+F2Rqwn17ewCfbvIeiS1im/zVUjq+o5ZyCC9f
0fAAn0H2F3Ttj4/FaXFYJndmqmgfXUSf
=re93
-----END PGP SIGNATURE-----
_______________________________________________
Cherokee mailing list
Cherokee [at] lists
http://lists.octality.com/listinfo/cherokee

Cherokee users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.