SEO forum : Search Engine Optimization Forum

SEO forum : Search Engine Optimization Forum (http://www.seo-guy.com/forum/index.php)
-   PHP forum (http://www.seo-guy.com/forum/forumdisplay.php?f=33)
-   -   Easy script problem (showing current url) (http://www.seo-guy.com/forum/showthread.php?t=11535)

7steij17 03-06-2006 10:21 PM

Easy script problem (showing current url)
 
Good evening :)

Ok, I am using Advanced Poll script and .htaccess, which is proving to be a problem, see when people vote, they are taken to the .php page instead of the rewritten page.

Here's an example, /fight.html is actually /cool/fight.php so when people vote on /fight.html they are taken to /fight.php which doesn't even exist, I want it to take people to the current page they are on after rewrite not before rewrite. Here is the script

Quote:
<?php

$include_path = dirname(__FILE__);
if ($include_path == "/") {
$include_path = ".";
}

if (!isset($PHP_SELF)) {
global $HTTP_SERVER_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;
$PHP_SELF = $HTTP_SERVER_VARS["PHP_SELF"];
if (isset($HTTP_GET_VARS)) {
while (list($name, $value)=each($HTTP_GET_VARS)) {
$$name=$value;
}
}
if (isset($HTTP_POST_VARS)) {
while (list($name, $value)=each($HTTP_POST_VARS)) {
$$name=$value;
}
}
if (isset($HTTP_COOKIE_VARS)) {
while (list($name, $value)=each($HTTP_COOKIE_VARS)) {
$$name=$value;
}
}
}

global $POLLDB, $POLLTBL, $CLASS;
require $include_path."/include/config.inc.php";
require $include_path."/include/$POLLDB[class]";
require $include_path."/include/class_poll.php";
require $include_path."/include/class_pollcomment.php";
require $include_path."/include/class_plist.php";

$CLASS["db"] = new polldb_sql;
$CLASS["db"]->connect();
#$php_poll = new poll();
#$php_poll_comment = new pollcomment();
$php_poll = new plist();

?>


So basically this script take people to the directory that the page is rewritten in (not the file where the file is), and the name of the file (not rewritten, so if origanal file was go.php and rewritten is go.html it take people to the file go.php).

So what it does:

Rewritten page: /go.html Non-Rewritten: /dir/go.php When you click vote you go to: /go.php

What I want:

When you click vote, you go to the exact page that was in the address bar before.

Hopefully I wasn't to confusing, if I was please tell me. I am lost, and will take any help anyone will give me, thanks in advance. :)

7steij17 03-07-2006 06:19 AM

i just redirected it, its fine now..


All times are GMT -8. The time now is 08:14 PM.

Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.