Apache Url are not being reading correctly, rewrite problem?

0

Issue

Recently I migrated my websites to another server that are using ISPCP. But, I am getting some trouble, the variables that are passing in the URL aren’t being read.

Example:
the URL:
http://www.site.com/index.php?page=show.php&id=4030

should call “show.php” (show.php make a select in some table and show the result, it was working in the old server), but now this url just call “index.php” without interpret the parameters.

Is it some rewrite problem?

Apache log doenst show any error, it returns code 200… What is wrong?

Solution

The problem was in index.php

I just changed:

if ($HTTP_GET_VARS['page'])
   require_once("$HTTP_GET_VARS[page]");

)

to

if (!$_GET['page'])
   require_once($_GET['page']);

I just dont know why in the old server it was working…

Answered By – Thomas

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More