[wp-hackers] Problem with wp_get_referer and IIS?

Derek Hogue derek at amphibian.info
Thu Jan 31 14:20:55 GMT 2008


Hey all,

This is kinda a repost of a thread I started in December:

http://comox.textdrive.com/pipermail/wp-hackers/2007-December/016687.html

But the replies didn't really address the root of the problem.

Here's my situation again:

My plugin (GigPress) has its own Options page, located under a new top- 
level page.  So the URL of my options page is:

http://example.com/wp-admin/admin.php?page=gp-options

This page posts its form contents to the main WP options page:

http://example.com/wp-admin/options.php

as instructed in the codex

http://codex.wordpress.org/Creating_Options_Pages

Under most configurations, this functions correctly - the form posts  
to the Options page, and then the user is sent back to the GigPress  
options page with the 'updated=true' string appended to the URI.

However, the problem people on IIS are having (I'm not sure it's all  
IIS setups, but this has been isolated to IIS so far), is that the  
'admin.php' part of the URI is stripped, so instead of landing at:

http://example.com/wp-admin/admin.php?page=gp-options&updated=true

The user lands at:

http://example.com/wp-admin/?page=gp-options&updated=true

Which leads to an error page: "Cannot load gp-options."  (since the  
index of /wp-admin/ doesn't know what to do with '?page=gp-options')

 From looking at the options.php source, I can only think that the  
wp_get_referer function is not functioning correctly under these  
certain server configurations (whatever they may be, haha, very clear,  
I know).

Has anyone else encountered this problem?  Ideas?

Best,
Derek
--
http://amphibian.info





More information about the wp-hackers mailing list