YAFLogo

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
The default URL rewriter rules works correctly if app.config file has the default value

However if we change the value in app.config value to

Then many (or all) URL rewriter rules fails and it gives a "Resource cannot be found" error for all pages.

To fix this bug, I had to remove "yaf_" from urlrewiter.config file to correctly redirect pages.

Could we make the rules in file dynamic, so that changing value in app.config does not break the pages.

Sponsor
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
Actually removing "yaf_" from app.config and urlrewriter.config (as mentioned above) broke a LOT of pages.

The pages which were broken are in header of the page (my profile, my inbox, my album) and links in main page (new topic, moderate, post reply, etc)

I tried looking inside urlbuilderrewrite.cs file and could not find "yaf_" there.

Is there a way to remove "yaf_" from URLs without breaking the page links?

I am using the latest build from codeplex. I built it manually by running "build.bat" file.

Update: In app.config, I also changed enableurlrewriting = "false". But it still gave me a "resource cannot be found" error. It seems enableurlrewriting=false setting might be broken.

Update 2: enableurlrewriting = "false" is working correctly. I had to stop IIS express and restart it for changes. Unlike web.config, it does not use the latest version automatically.

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago