Preserving URL after redirect?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey all,

I have a weird issue that's got me pretty stumped, and I'm not sure I can do what the client is asking, or at least not how I'm trying to do it.

I have a code base of my own I'm building sites on, fully AJAX enabled so that once the site loads it never fully refreshes a page, but AJAX runs everything through JS to server calls for content, updating only sections of the page only when needed, say for like the small calendar in the upper right corner when a new month is clicked.

The site is basically a CMS for school sports teams to create their own pages, and the schools are accessed via individual directories like

http://prepcube.com/wi/madison/

So I created the wi/madison/

...directory when the school signs up and placed a file there that parses the URI to get the schools "shortname", in this case "madison", and then sets a session variables for school ID that allows the user to access this school's data.

Then it redirects back to

http://prepcube.com/

...which of course loses the wi/madison portion of the URL, thought the client wants this preserved and to remain in the URL field.

And since this is a fully AJAX enables site, the URL in the browser's URL field would never change from

http://prepcube.com/wi/madison/

...which is something the client really likes.

So, my question is how would I do that, and I strongly suspect if it's possible at all an .htaccess file with the proper entries would be the way to do it, not using PHP code to redirect as I am now.

Is this the case?

Unfortunately, I must confess to not being terribly familiar with htaccess files, I believe this would be rewrite rules to rewrite the URL and point it to the right place? But even with htaccess rewrite rules could this be done to preserve the full URL with state/school in the browser's URL field?

Any advice, as always, is greatly appreciated.

Thanks globules!
Skip
--
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/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux