Hello,
I want to rewrite http://www.forExample.org/index.php?go=download to http://www.forExample.org/download.php
Execpt the index.php all file-extentions are .inc like download.inc.
"
index.php contains
<?
while (list ($var, $value) = each ($_REQUEST))
$$var = $value;
if(!isset($go))
$go = "index";
if(file_exists("$go.inc"))
include("$go.inc");
else
include("index.inc");
"
So I tried the the following line without success (vhost.conf):
rewrite ^/.php/([^/\.]+)/?$ /index.php?page=$1 break;
rewrite ^/(.*)\.php$ /?go=$1 redirect;
rewrite ^/(.*).php$ /?go=$1;
rewrite ([^index]+)\.php /index.php?go=$1 break;
rewrite ('/^([^index]+)\.php$ /?go=$1 break;
rewrite ([^index]+)\.php /index.php?go=$1 break;
then I tried a new location-Block
location ~ \index.php?go=$ {
if (!-f $request_filename) {
rewrite ^(.*)\?go=$ $1.php permanent; }
}
Also with no success.
Maybe someone can help me ;)
I want to do enter .php to get my content ;)
I want to rewrite http://www.forExample.org/index.php?go=download to http://www.forExample.org/download.php
Execpt the index.php all file-extentions are .inc like download.inc.
"
index.php contains
<?
while (list ($var, $value) = each ($_REQUEST))
$$var = $value;
if(!isset($go))
$go = "index";
if(file_exists("$go.inc"))
include("$go.inc");
else
include("index.inc");
"
So I tried the the following line without success (vhost.conf):
rewrite ^/.php/([^/\.]+)/?$ /index.php?page=$1 break;
rewrite ^/(.*)\.php$ /?go=$1 redirect;
rewrite ^/(.*).php$ /?go=$1;
rewrite ([^index]+)\.php /index.php?go=$1 break;
rewrite ('/^([^index]+)\.php$ /?go=$1 break;
rewrite ([^index]+)\.php /index.php?go=$1 break;
then I tried a new location-Block
location ~ \index.php?go=$ {
if (!-f $request_filename) {
rewrite ^(.*)\?go=$ $1.php permanent; }
}
Also with no success.
Maybe someone can help me ;)
I want to do enter .php to get my content ;)