开发者

Rewriting URL based on who is logged in

开发者 https://www.devze.com 2023-04-08 17:33 出处:网络
Im looking for the best way to change the URL to pages based on who is logged on, the limitation is all the pages are PRE generated so the actual html will already be generated and cannot be generated

Im looking for the best way to change the URL to pages based on who is logged on, the limitation is all the pages are PRE generated so the actual html will already be generated and cannot be generated again on a pr user basis.

Posible solutions A posible solution might be to use javascript to basicly add to the end of all URL ?=MyUserName , but im unsure if this will work with all spiders ( By all i mean the major search engines). This solution feels a bit dirty to me..

There might also be some way of of when the req开发者_运维技巧uest comes in to then basicly say that response is from Default.aspx=?Username with doing a response.Redirect?

Its also importent to remember i will be changing the cache settings based on this, like saying if your not logged in the page can be cached.


I'm not sure if you must use .html files or another specific extension, but you could always create your own handler and process what you want to do on every request that way. Your handler would determine who is accessing the page and then do a Response.Redirect (or whatever action is necessary).

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号