[wp-hackers] 2 Questions: $_REQUEST equivalent and using GET in mod_rewrite

jacobsantos at branson.com jacobsantos at branson.com
Tue Aug 28 19:23:06 GMT 2007


2. add_rewrite_rule($regex, $redirect);

For some reason the third parameter won't work. Neither this function or 
the method in the class. Might be a bug.

Alex Andrews wrote:
> On 28/08/07, Alex Günsche <ag.ml2007 at zirona.com> wrote:
>   
>> On Tue, 2007-08-28 at 18:01 +0100, Alex Andrews wrote:
>>     
>>>  How can I get /artists/x/ to translate to artists.php?id=x or whatever.
>>>       
>> I don't understand the problem. Do you want to say you have a file
>> artists.php and want it to handle $_GET['id']? In this case, simply let
>> your plugin process $_GET['id'] and require('artists.php') where
>> appropriate. Btw, I wouldn't copy files into WP's base folder, but
>> rather have it within the plugin's directory.
>>     
>
> Thats not the problem - the problem is
>
> 1. How to santize the incoming data from $_GET. Or whereever.
> 2. How to work the mod_rewrite facilities (preferably from within
> Wordpress) to pass /artist/a/ onto artists.php?artist_id=a .
>
> Alex
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>
>
>
>   



More information about the wp-hackers mailing list