Re: Preserving URL after redirect?

From: Date: Wed, 05 Mar 2008 17:51:19 +0000
Subject: Re: Preserving URL after redirect?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-271037@lists.php.net to get a copy of this message
Wolf wrote:
<!-- SNIP --> Why does is redirect back to the beginning? Seems to me that is where your issue is arising from. The client wants /wi/madison to be in the URl, so you have a few things to do... Stop redirecting to the root and leave it in the /wi/madison folder, then do stuff it needs to do just using the root+stored_path to give the site it's depth. Or maybe I am missing something in the way your site works? Wolf
Because each school has its own directory, really only to make access via... http://www.prepcube.com/{state}/schools_short_name But the system is up in the doc root, beginning with http://www.prepcube.com/index.php So the school's directory needs to redirect back to the system, after setting the session var that determines what data is read. I think Richard probably hit the answer with a mod_rewrite. Basically, I need a rule that would take the URL http://www.prepcube.com/{state}/schools_short_name And call http://www.prepcube.com/index.php and perhaps pass the school's shortname value in a get var? Richard, would that work, and still preserve the school's individual URL in the browser's URL field? Is that what you're thinking? I'm reading up on mod_rewrite right now to determine if this is possible. -- Skip Evans Big Sky Penguin, LLC 503 S Baldwin St, #1 Madison, WI 53703 608-250-2720 http://bigskypenguin.com =-=-=-=-=-=-=-=-=-= Check out PHPenguin, a lightweight and versatile PHP/MySQL, AJAX & DHTML development framework. http://phpenguin.bigskypenguin.com/

« previous php.general (#271037) next »