Just a breaktrough, but the problem persists:

-----------------
#example of directory that doesn't need to use rewrite.
location match "/themes/(.*)/assets/(.*)" {
request no rewrite
}

#index.php is the entry point of the application and runs the php fastcgi.
location match "index.php" {
fastcgi socket "/run/php-fpm.sock"
}

#all others locations rewrite to /index.php
location match "(.*)" {
request rewrite "/index.php$REQUEST_URI"
}
-----------------

The problem is that when rewriting to index.php in this manner the
links are formatted in the same way as the rewrite, is there a way
apart from "request strip" that I can use to change the $REQUEST_URI
so the fastcgi socket gets the value with the "/index.php" striped ?

cheers.
Elias.

2018-07-17 17:13 GMT-03:00 Elias M. Mariani <marianiel...@gmail.com>:
> Hi,
> I'm trying to adapt the rewrite rules of OctoberCMS to httpd.conf to
> avoid using apache-httpd.
>
> Now everything is working ok with this rules:
>
> -----------------
> #example of directory that doesn't need to use rewrite.
> location match "/themes/(.*)/assets/(.*)" {
> request no rewrite
> }
>
> #index.php is the entry point of the application and runs the php fastcgi.
> location match "index.php" {
> fastcgi socket "/run/php-fpm.sock"
> }
>
> #all others locations rewrite to /index.php
> location match "(.*)" {
> request rewrite "/index.php"
> }
> -----------------
>
> But for some reason the URLs are working like this:
> example.com/forums/openbsd
> Works ok, rewrites and everything is OK, but for some reason all the
> links point to:
> example.com/index.php/forums/openbsd
> That also works the same as is the first case.
>
> Now, this URLs are defined by the application, I guess that the
> application understands that the base_url (I made the name up...) is
> example.com/index.php and not example.com ?
>
> Might this be an incompatibility between httpd and apache-httpd?
>
> Cheers.
> Elias.

Reply via email to