D
D
Dmitry Sergeev2012-05-04 05:53:41
Nginx
Dmitry Sergeev, 2012-05-04 05:53:41

Is it possible to set a constant $_GET variable in the config without rewrite?

On ubuntu 10.4 server, php5-fpm 5.3.10.
There is a site engine. If you pass the m=true getom in the request, then it automatically loads everything that is needed for the mobile version of the site. In this engine, it is possible to automatically add ?m=true to each internal link, but I want to make it more transparent: make the m.site.ru subdomain, set the settings for it in the nginx config (almost duplicating the settings for the main domain) and automatically insert into them in get request variable m

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
avalak, 2012-05-04
@JetMaster

Yes it is possible. For example like this:
fastcgi_param QUERY_STRING m=true&$query_string;

F
Fyodor, 2012-05-04
@Richard_Ferlow

And in the spirit of $_GET['m'] = true; it is forbidden?

A
Andrey Burov, 2012-05-04
@BuriK666

Can be through one place using auto_prepend_file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question