Welcome! Log In Create A New Profile

Advanced

Re: rewrite rules cms phpwcms not working

Francis Daly
February 18, 2015 04:26PM
On Tue, Feb 17, 2015 at 06:26:59PM -0500, dansch8888 wrote:

Hi there,

> I tried your examples and they work very well.
> In the next days I will test it more extensive.

Good to hear, thanks.

> > >
> (track|include|img|template|picture|filearchive|content|robots\.txt|favicon\.ico)($|/)
> > > - [L]
> > I think that say "anything that matches that pattern should be served
> > as a plain file, and not given to the php interpreter". But there are
> > also .htaccess files in some of those directories.
>
> Yes, that's true, but isn't it also that at the apache server this folders
> and files are just excluded for rewrite?

That sounds correct. I stated it badly.

"Do not rewrite, and therefore do not fall through to /index.php, for
these requests."

They are handled by whatever else the apache config says.

> > if ($request_uri ~ /(\d+)\.(\d+)\.(\d+)\.(\d+)\.(\d+)\.(\d+)\.html) {
> > set $bit_of_qs "id=$1,$2,$3,$4,$5,$6";
> > }
>
> This is comming from some old versions of the CMS I believe, were not always
> aliases were set up.
> At the moment, when you create a article, the CMS sets an dummy alias by
> default.
> In the "old" time, there were urls like this index.php?id=0.0.0.0.0.0
> Now there are normaly such urls index.php?dummyalias only.

If that part isn't needed, then so much the better.

All nginx cares about is: for incoming requests, how should they be handled?

> > location / {
> > try_files $uri $uri/ @index.php;
> > }
>
> Is there a need for the $uri/?

The apache config seemed not to do the rewrite (= /index.php fallback)
if the request was for something that was recognised as an existing
directory. This is the same.

I do not know if it is needed in your implementation.

> I had read this is for subfolder only. This CMS need the rewrite just for
> the root folder and index.php.

It was not clear to me how a request for /dir/file.html should be handled,
depending on the existence of "dir" and "file.html".

If that kind of request matters in the cms, you should probably test
that it does what you want.

Good luck with it,

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

rewrite rules cms phpwcms not working

dansch8888 February 15, 2015 09:02AM

Re: rewrite rules cms phpwcms not working

Francis Daly February 16, 2015 03:38PM

Re: rewrite rules cms phpwcms not working

dansch8888 February 17, 2015 06:26PM

Re: rewrite rules cms phpwcms not working

Francis Daly February 18, 2015 04:26PM

Re: rewrite rules cms phpwcms not working

dansch8888 February 23, 2015 01:51PM

Re: rewrite rules cms phpwcms not working

Francis Daly February 24, 2015 03:40PM

Re: rewrite rules cms phpwcms not working

dansch8888 March 18, 2015 05:53PM

Re: rewrite rules cms phpwcms not working

dansch8888 March 19, 2015 05:03PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready