Unstoppable Domains

$5 for giving me fix - Extremely annoying small error

Spaceship Spaceship
Watch

crazyryan

Established Member
Impact
2
Basically, if you go to http://www.proxy.gd/proxies/proxy.php?id=73 it'll redirect, however when I go to http://www.proxy.gd/proxy/id/73/ it doesn't redirect, it always used to and for some reason it's just stopped. My code is below.

PHP:
<?
// We need the database stuff
require 'config.php';
if ($_GET['id']) {
$id = mysql_real_escape_string($_GET['id']);
// Check ID exists
$q = "SELECT * from links where link_id = '$id'";
$res = mysql_query($q) or die("Error in query " . mysql_error());
$nr = mysql_num_rows($res);
if ($nr > 0) {
$data = mysql_fetch_assoc($res);
mysql_query("UPDATE links set link_visitors = (link_visitors + 1) where link_id = '$id'");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>You are being redirected to <?php echo " " . $data['link_title'] . " "; ?> now.</title>
<!-- Begin Publisher Code -->
<script src='http://www.adversalservers.com/publisherJS.js'></script>
<script type='text/javascript' language='javascript'>
initAdversal('2c908c519fb86e4e0f9158fadddfb82c', true);
</script>
<!-- End Publisher Code -->
<link href="http://www.proxy.gd/style/style.css" rel="stylesheet" type="text/css" />
<!--[if IE]>
    <link href="http://www.proxy.gd/style/ieBugs.css" rel="stylesheet" type="text/css" />
<![endif-->
</head>

<div id="border">
<div id="wrapper"><?php
echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url= " . $data['link_url'] . "\">
<p class=\"box\" align=\"center\">You are being redirected to " . $data['link_title'] . " now.<br /><br /></p>";
exit();
}
else {
echo "Invalid ID";
}
}
else {
echo "No ID specified";
}
?>


</div></div>
<body>
</body>
</html>

I'm not sure if this is a PHP error or mod_rewrite error, although I can't think of it being a mod_rewrite error ..

Options +FollowSymLinks
RewriteEngine on
RewriteRule proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2

Is my mod_rewrite code. If you can help me fix this and get the mod_rewrited url working I'll send you $5 via paypal, thanks.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I'm not entirely sure with mod_rewrite, but it may be worth trying
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ./proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2
In the htaccess file

If that doesn't work then try putting
<?php echo $_SERVER['REQUEST_URI']; ?>
at the top of proxy.php, then accessing it through the mod_rewrited file and if it doesn't come up with a URL like the other page, then that narrows it down to the .htaccess file, if the URL is like the non-mod_rewrite one, then it must be a php problem
 
Last edited:
0
•••
0
•••
hmm, i see what you mean about this being an annoying errror lol,
I am thinking this is a mod_reqrite error then, since it doesn't seem to be passing on the variables correctly

Try these, in the following order

1st
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ./proxy/(.+?)/(.+?)/$ /proxies/proxy.php?$1=$2

if not then
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ./proxy/(.+?)/(.+?)/ /proxies/proxy.php?$1=$2

edit: A third thought, after looking through the apache manual
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^proxy/(.*)/(.*)/$ /proxies/proxy.php?$1=$2

And a fourth for good luck ;)
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^proxy/(.+?)/(.+?)/$ /proxies/proxy.php?$1=$2

Hopefuly one of these will work!

Lee :)
 
Last edited:
0
•••
Neither of them worked :(

Fixed it, I had something else in my .htaccess that must have been interfering with it.
 
0
•••
Argh dammit!
Last attempt lol, after that I'm afraid I may give up
Code:
RewriteEngine On
RewriteRule ^page/(.+)$ /proxies/proxy.php?id=$1
That should work, I think hope pray etc.

Lee :)
 
0
•••
Dynadot โ€” .com TransferDynadot โ€” .com Transfer
Domain Recover
DomainEasy โ€” Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back