PDA

View Full Version : Query Strings not accessible via $_GET command


deafboyzaudio
06-22-2011, 08:18 PM
Ok i have a perplexing issue that I think I know the root cause of, just no idea how to fix it...

my url looks like this :http://www.mysite.com/videos/login?accesscheck=%2Fstore%2Forders_History.phpwhe n i use if(isset($_GET['accesscheck'])){$redirect =$_GET['accesscheck'];} it returns as if it is not set.

to make things interesting if i run $_SERVER['QUERY_STRING'] i get 'id = 32'Here is the thing, all my pages are accessed through a central page, home.php. The various content variations i have like latest media page, upload page etc are all accessed through the 'home.php' page via the inclusion of '???.module' files. On the server the login page would look like www.mysite.com/home.php?id=32 (http://www.mysite.com/home.php?id=32)But the url in the browser would look like www.mysite.com/videos/login?accesscheck=%2Fstore%2Forders_History.php (http://www.mysite.com/videos/login?accesscheck=%2Fstore%2Forders_History.php)ho w do i extract the query string from the actual url in the browser?

I have heard $_SERVER['REQUEST_URI'] will work, and it does return the browser query string i am looking for... but how do i extract from it in a get sorta method?

i didnt attach the rewrite rules as they are in .htaccess and heard its not safe to do so.... I would rather extract the query string from REQUEST_URI anyways

how to do this?

deafboyzaudio
06-23-2011, 05:25 PM
RewriteRule ^login/?$ home.php?id=32 [L]Options +FollowSymlinks
RewriteCond %{QUERY_STRING} edit=(.*)
RewriteRule ^edit/?$ home.php?id=31&edit=%1 [L]RewriteEngine on
#Category rewrite
RewriteCond %{REQUEST_URI} !.php
RewriteRule ^videos/([^/]+)/?$ home.php?id=7&crw=$1 [L]
RewriteRule ^videos/([^/]+)/([0-9]+)/?$ home.php?id=7&crw=$1&page=$2 [L]
RewriteRule ^videos/([^/]+)/_([^/]+)/?$ home.php?id=7&crw=$1&scrw=$2 [L]
RewriteRule ^videos/([^/]+)/_([^/]+)/([0-9]+)/?$ home.php?id=7&crw=$1&scrw=$2&page=$3 [L]here is an idea of some of the stuff in my ,htaccess. I'm sure these rewrites are why but the vidiscript script that im using came with this and I dont have a clue what to edit or how to work with rewrites this complicated.... TONS of seo benifits through so im going to leave it...

any ideas??? All ideas are greatly appreciated

deafboyzaudio
07-01-2011, 04:53 AM
anyone have any ideas about this? I am not able to find anything on google thats even relatively easy to understand