PDA

View Full Version : سوال: اشكال در Context.RewritePath



alialirezaee1
یک شنبه 09 بهمن 1390, 10:44 صبح
سلام دوستان.
من از Context.RewritePath كه استفاده مي كنم در كامپيوتر خودم كار مي كنه مشكلي هم ندارم
index.aspx?post=p1 را به dabira.ir/p1.aspx تبديل مي كنم و خوب كار مي كنه.
ولي وقتي تو سايت upload مي كنم كار نمي كنه و ارور The resource cannot be found.ميده

لطفا راهنماييم كنيد

مرسي






protectedvoid Application_BeginRequest(object sender, EventArgs e)
{
string fullOrigionalpath = Request.Url.ToString();
int countstr = fullOrigionalpath.Split('/').Length;
if (fullOrigionalpath.Split('/')[countstr-1].Contains(".aspx"))
{
string pg = fullOrigionalpath.Split('/')[countstr-1].Replace(".aspx", "");
Context.RewritePath("index.aspx?post=" + pg);
}
}

alialirezaee1
دوشنبه 10 بهمن 1390, 13:09 عصر
دوستان خودم درستش كردم