YAFLogo

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
Hi,

I have successfully embedded the yaf.net-forum into my website.

Now I am wondering why the URL-Rewriting is no longer working.

The forum files are placed in a subfolder called "forum". I have placed the forum-control in my site "Forum.aspx" which is located in the "forum" subfolder.

I have adapted the rewrite rules (just replaced the "Default.aspx" with "Forum.aspx").

Any tips how to make url rewriting to work again?

Thanks in advance

jimbo

Sponsor
jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
Maybe Jaben has some tips? This website seems to use the forum-control too AND has url rewriting enabled.

I am curious how you managed it.

Thanks in advance

Jimbo

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
13 years ago
You need to add the entry to your app.config

<add key="YAF.BaseScriptFile" value="Forum.aspx" />

and change all "Default.aspx" to "Forum.aspx" in the UrlRewriter.config.

Tested successfully with my Sample App

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
Hey,

thanks for you reply.

I added the entry to my app.config and replaced all Default.aspx with Forum.aspx in the URLRewriter.config but that didn't help. The forum links are still working but the url rewriting is not applied.

Here is a sample application of my test project.

Can you supply your test project too so I can check where my fault is?

Thanks in advance

jimbo

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
13 years ago
Please Change the Value to

<add key="YAF.BaseScriptFile" value="forum.aspx" />

Then your test app should work.

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago

Please Change the Value to

<add key="YAF.BaseScriptFile" value="forum.aspx" />

Then your test app should work.

Originally Posted by: tha_watcha 

Wow I changed the capital F to a small f and it worked. Hehe.

Thank you very much! 🙂

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
I have found another two issues with my embedded forum:

1. The first entry in the breadcrumb navigation shows the forum name and is linked to http://localhost:54248/forum/ instead of http://localhost:54248/forum/forum.aspx

(when i click on it it will open the forum itself without being in the masterpage as it should)

2. I am using YafBuildLink.GetLink(ForumPages.posts, "t={0}", topicID) to get links from the forum. I am showing the links (in my case the last 5 forum posts) on the masterpage which works good as long as i stay on the masterpage. If i navigate to another page like About.aspx, the GetLink method returns something like this http://localhost:54248/forum/about.aspx?g=posts&t=3 (you see that the link contains about.aspx instead of forum.aspx).

Any ideas how to solve these issues?

Thanks in advance

jimbo

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
I solved the second problem by using the following line in app.config:

But my first problem still persist.

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.1 BETA
13 years ago
Replace the content from the default.aspx with content from the forum.aspx and content of the Master Page should be visible.

And please use YafBuildLink.GetLinkNotEscaped instead of YafBuildLink.GetLink

jimbo2
  • jimbo2
  • 60.2% (Friendly)
  • YAF Camper Topic Starter
13 years ago
Thanks!

Now everything works fine :-d