Rewrite https to http expect one location
basti
black.fledermaus at arcor.de
Tue Feb 25 09:21:13 UTC 2014
There is still a rewrite problem with my config:
server {
...
root $root_directory;
index index.php index.html index.htm;
fastcgi_index index.php;
location ~ /mailadmin/(.*.\.php)$ {
root /path/to/root/;
...
index index.php;
}
location / {
return 301 http://$server_name$request_uri;
}
}
I want all != mailadmin is rewrite to http.
URLs like
https://example.com/mailadmin/test.php?ps=301A1123344556E925803435&framework=
https://example.com/mailadmin/share/themes/default/tabmain/first_on.gif
I don't want to rewrite.
But https://www.tank-app.de/mailadmin/ is also rewrite, I dont know why.
On 24.02.2014 19:07, Francis Daly wrote:
> On Mon, Feb 24, 2014 at 04:10:24PM +0100, basti wrote:
>
> Hi there,
>
>> # do not rewrite this
>> location /mailadmin/(.*.\.php)$ {
> You probably will have no requests that will match this prefix location.
>
>> location / {
>> rewrite ^ http://$server_name$request_uri? permanent;
> Many requests will match this location, and be redirected to a http url.
>
>> location ~ \.php$ {
> Some requests will match this location.
>
>> URLs like
>> https://example.com/mailadmin/test.php?ps=301A1123344556E925803435&framework=
>> are partly rewrite.
> I would expect that request to match the third location.
>
> What response do you get for it? What response do you want for it?
>
> f
More information about the nginx
mailing list