Mailing List Archive

Translate HTAccess regexp in cherokee
Hi,

I installed opencart (http://www.opencart.com) on my cherokee web server

First, i want to activate SEO URLs. Opencart give me an htaccess file
but i don't know how to "translate" the rewrite rules in cherokee.
Here is the content of opencart htaccess :

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Because i'm not a regexp expert, i use http://www.regextester.com/ to
help me , but it's not working.
Can someone help me ?

Second,
Opencart says that this two php flags will be activate in some cases :

# php_flag register_globals off
# php_flag magic_quotes_gpc Off

I think i will be make a special php source with theses parameters or Is
there another method ?

Thanks in advance,
Bertrand (French system admin)
Re: Translate HTAccess regexp in cherokee [ In reply to ]
On Tue, 12 Jun 2012, Bertrand FRUCHET wrote:

> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]

Only the last line is a regular expression, and actually... the point is
that you should know what these rules do. It seems that a simple:

FileExist => List & Send
Default => Redirection, Internal ^/(.*) => index.php?_route_=$1

...could already do the trick.


Stefan
Re: Translate HTAccess regexp in cherokee [ In reply to ]
It may help you : (in French)

http://www.furie.be/news/16/15/Cherokee-et-CmsMadeSimple.html

we had about the same .htaccess

2012/6/12 Stefan de Konink <stefan@konink.de>

> On Tue, 12 Jun 2012, Bertrand FRUCHET wrote:
>
> RewriteEngine On
>> RewriteBase /
>> RewriteCond %{REQUEST_FILENAME} !-f
>> RewriteCond %{REQUEST_FILENAME} !-d
>> RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
>>
>
> Only the last line is a regular expression, and actually... the point is
> that you should know what these rules do. It seems that a simple:
>
> FileExist => List & Send
> Default => Redirection, Internal ^/(.*) => index.php?_route_=$1
>
> ...could already do the trick.
>
>
> Stefan
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
>
>
> !DSPAM:1,4fd74f21199536468934314!
>
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
>
>
Re: Translate HTAccess regexp in cherokee [ In reply to ]
Hi,

i have clone (Tomato Card) running Cherokee and works fine.

In php i suggest using fpm. Also you can run more php-fpm, if you
really need special config for some pages. I think php_flag
magic_quotes_gpc is depriciate.

Regards,
Jan

On Tue, Jun 12, 2012 at 4:26 PM, Bertrand FRUCHET <astebert@gmail.com> wrote:
> Hi,
>
> I installed opencart (http://www.opencart.com) on my cherokee web server
>
> First, i want to activate SEO URLs. Opencart give me an htaccess file but i
> don't know how to "translate" the rewrite rules in cherokee.
> Here is the content of opencart htaccess :
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
>
> Because i'm not a regexp expert, i use http://www.regextester.com/ to help
> me , but it's not working.
> Can someone help me ?
>
> Second,
>  Opencart says that this two php flags will be activate in some cases :
>
> # php_flag register_globals off
> # php_flag magic_quotes_gpc Off
>
> I think i will be make a special php source with theses parameters or Is
> there another method ?
>
> Thanks in advance,
> Bertrand (French system admin)
>
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
>
_______________________________________________
Cherokee mailing list
Cherokee@lists.octality.com
http://lists.octality.com/listinfo/cherokee
Re: Translate HTAccess regexp in cherokee [ In reply to ]
A new PHP install will not have have problems with register_globals or
magic_quotes_gpc.

As Stefan said, a rule to serve static files and then do an internal
redirect of everything else to index.php should do the trick.

Something like this:
http://img191.imageshack.us/img191/6828/rewriterulesg.png

Lastly, I'm not sure how Open Cart works, but you may need to change the
"index.php?_route_=$1" to "index.php?_route_=/$1" (note the slash).

-Locke

On Tue, Jun 12, 2012 at 10:26 AM, Bertrand FRUCHET <astebert@gmail.com>wrote:

> Hi,
>
> I installed opencart (http://www.opencart.com) on my cherokee web server
>
> First, i want to activate SEO URLs. Opencart give me an htaccess file but
> i don't know how to "translate" the rewrite rules in cherokee.
> Here is the content of opencart htaccess :
>
> RewriteEngine On
> RewriteBase /
> RewriteCond %{REQUEST_FILENAME} !-f
> RewriteCond %{REQUEST_FILENAME} !-d
> RewriteRule ^([^?]*) index.php?_route_=$1 [L,QSA]
>
> Because i'm not a regexp expert, i use http://www.regextester.com/ to
> help me , but it's not working.
> Can someone help me ?
>
> Second,
> Opencart says that this two php flags will be activate in some cases :
>
> # php_flag register_globals off
> # php_flag magic_quotes_gpc Off
>
> I think i will be make a special php source with theses parameters or Is
> there another method ?
>
> Thanks in advance,
> Bertrand (French system admin)
>
>
>
> _______________________________________________
> Cherokee mailing list
> Cherokee@lists.octality.com
> http://lists.octality.com/listinfo/cherokee
>
>