YAFLogo

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

1. Download the latest build from codeplex

2. In App.config, change

3. in URLrewriter.config, replace all "yaf_" to "m".

4. Load the forum

Many links in header (my albums, my topics, etc) are not working. Clicking on it gives a "page not found" error.

Related bug:

Steps:

1. Download the latest build from codeplex

2. In App.config, change (keep it empty)

3. in URLrewriter.config, replace all "yaf_" to "".

4. Load the forum

Most links in header (my inbox, my albums, my topics, etc) and most other links on page (new topic, reply, etc) are not working. Clicking on it gives a "page not found" error.

In both cases above, if we change default value back to "yaf_", all links are working properly.

Sponsor
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
Also is there a way to remove "yaf_" from ALL urls?

Example:

yaf_postst_

yaf_postsm_

yaf_profile

yaf_topics

If i rewrite urlrewriter.config from "yaf_postst_" to something else, the links are broken. I have not seen this issue in other forum software (phpbb, vbulletin, mybb, ipboard, etc).

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago
This is not a bug, you need to configure the urlrewriter config correctly.

If you want to set it to

<add key="YAF.UrlRewritingPrefix" value="" />

then the urlrewriter.config should look like this...

<rewriter>
  <rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&amp;$5" processing="stop" />
	<rewrite url="^~/(.+?)?info?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
	<rewrite url="^~/(.+)?topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
	<rewrite url="^~/(.+)?topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
	<rewrite url="^~/(.+)?forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;find=$3&amp;$7" processing="stop" /> 
	<rewrite url="^~/(.+)?postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
	<rewrite url="^~/(.+)?postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
	<rewrite url="^~/(.+)?profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)t([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;t=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)f([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;f=$4&amp;$7" processing="stop" /> 
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;$7" processing="stop" />
  <rewriter>
  <rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&amp;$5" processing="stop" />
  <rewrite url="^~/(.+?)?info?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)t([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;t=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)f([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;f=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?\.aspx\?(.+)?$" to="~/Default.aspx?g=$1&amp;$2" processing="stop" />
  <rewrite url="^~/(.+)?\.aspx$" to="~/Default.aspx?g=$1" processing="stop" />
</rewriter>

Actually the urls looking much cleaner now when :-d

If you want to set it like this

 <add key="YAF.UrlRewritingPrefix" value="m" />

then the urlrewriter.config should look like this...

then the urlrewriter.config should look like this...


[code=xml]<rewriter>
  <rewrite url="^~/(.+?)?mlogin?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&amp;$5" processing="stop" />
	<rewrite url="^~/(.+?)?minfo?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
	<rewrite url="^~/(.+)?mtopics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
	<rewrite url="^~/(.+)?mtopics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
	<rewrite url="^~/(.+)?mforum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?mpostst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;find=$3&amp;$7" processing="stop" /> 
	<rewrite url="^~/(.+)?mpostst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
	<rewrite url="^~/(.+)?mpostst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?mpostsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?mpostsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
	<rewrite url="^~/(.+)?mprofile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?mrsstopic([0-9]+)ft([0-9]+)t([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;t=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?mrsstopic([0-9]+)ft([0-9]+)f([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;f=$4&amp;$7" processing="stop" /> 
  <rewrite url="^~/(.+)?mrsstopic([0-9]+)ft([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?m([-0-9a-z_]+?)\.aspx\?(.+)?$" to="~/Default.aspx?g=$1$2$2&amp;$3" processing="stop" />
	<rewrite url="^~/(.+)?m([-0-9a-z_]+?)\.aspx$" to="~/Default.aspx?g=$1$2" processing="stop" />   
</rewriter>
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago
Nothing against YAF, but I'd rather omit that from the links. I tried the above code, but it blew things up. I have to get my beta site going again so I can test things more freely, lol.
JP
  • JP
  • 100% (Exalted)
  • YAF Leader
11 years ago
Looks good for me with the prefix="" initially...

Unfortunately the buttons don't work and post cannot be made as well as admin changes to boardsettings so not bite...


He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Old Chinese Proverb]
tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Looks good for me with the prefix="" initially...

Unfortunately the buttons don't work and post cannot be made as well as admin changes to boardsettings so not bite...

Originally Posted by: JP 

try the updated config

<rewriter>
  <rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=login&amp;$5" processing="stop" />
  <rewrite url="^~/(.+?)?info?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/$1Default.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)t([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;t=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)f([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;f=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Default.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?\.aspx\?(.+)?$" to="~/Default.aspx?g=$1&amp;$2" processing="stop" />
  <rewrite url="^~/(.+)?\.aspx$" to="~/Default.aspx?g=$1" processing="stop" />  
</rewriter>
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago
Tried copying that and received the error in the spoiler tags. Then I noticed a lot of the lines were duplicated and removed the duplicates. It worked within YAF, but then the buttons on my nav menu to other pages wouldn't work. I'd probably have to add lines for those pages.

Mainly I am just curious as to the importance of the lines being duplicated? Was that on purpose or just a big typo?lol

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: Unexpected end of file has occurred. The following elements are not closed: rewriter. Line 33, position 12.

Source Error:

Line 31:

Line 32:

Line 33:

Source File: \\URLRewriter.config Line: 33

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18033

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Tried copying that and received the error in the spoiler tags. Then I noticed a lot of the lines were duplicated and removed the duplicates.

Mainly I am just curious as to the importance of the lines being duplicated? Was that on purpose or just a big typo?lol

Originally Posted by: Zero2Cool 

Sorry posted the duplicated content. i corrected the above code

It worked within YAF, but then the buttons on my nav menu to other pages wouldn't work. I'd probably have to add lines for those pages.

Originally Posted by: Zero2Cool 

if you still use my sample application as basis for your site where the forum is in the folder forum then try this config...

<rewriter>
  <rewrite url="^~/(.+?)?login?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=login&amp;$5" processing="stop" />
  <rewrite url="^~/(.+?)?info?\.aspx\?i=([0-9]+?)&amp;url\=(.+)$" to="~/$1Forum.aspx?g=info&amp;i=$2&amp;url=$3" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&amp;f=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?topics([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=topics&amp;f=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?forum([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=forum&amp;c=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&amp;t=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)p([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&amp;t=$2&amp;p=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postst([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&amp;t=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)find([-a-z]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&amp;m=$2&amp;find=$3&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?postsm([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=posts&amp;m=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?profile([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=profile&amp;u=$2&amp;$6" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)t([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;t=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)f([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;f=$4&amp;$7" processing="stop" />
  <rewrite url="^~/(.+)?rsstopic([0-9]+)ft([0-9]+)(_([-a-z0-9]+))?\.aspx(\?(.+))?$" to="~/$1Forum.aspx?g=rsstopic&amp;pg=$2&amp;ft=$3&amp;$7" processing="stop" />
  <rewrite url="^~/forum/(.+)?\.aspx\?(.+)?$" to="~/forum/Forum.aspx?g=$1&amp;$2" processing="stop" />
  <rewrite url="^~/forum/(.+)?\.aspx$" to="~/forum/Forum.aspx?g=$1" processing="stop" />  
  <rewrite url="^~/forum/$" to="~/forum/Forum.aspx" processing="stop" />  
</rewriter>
Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago
I am, but just recently removed /forum to make it a little easier to upgrade to the latest changeset.

I removed /forum to get it to work for YAF, but then the nav links still don't work. Clicking one of them brings me back to YAF forum index.

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

Is it possible to have a clean URL.


Current: http://forum.yetanotherforum.net/yaf_postsm59725_Bug-in-URLrewriter-config.aspx

New: http://forum.yetanotherforum.net/Bug-in-URLrewriter-config.aspx
 
New: http://forum.yetanotherforum.net/Bug-in-URLrewriter-config

This will remove the "yaf_postsm59725" from the URL. Is that possible with urlrewriter? If yes, could you post urlrewriter code where the forum is in a subfolder (~/forum). Thank you very much. 👍

tha_watcha
  • tha_watcha
  • 100% (Exalted)
  • YAF.NET Project Lead 🤴 YAF Version: 4.0.0 rc 2
11 years ago

Hi the_watcha,

Is it possible to have a clean URL.


Current: http://forum.yetanotherforum.net/yaf_postsm59725_Bug-in-URLrewriter-config.aspx

New: http://forum.yetanotherforum.net/Bug-in-URLrewriter-config.aspx
 
New: http://forum.yetanotherforum.net/Bug-in-URLrewriter-config

This will remove the "yaf_postsm59725" from the URL. Is that possible with urlrewriter? If yes, could you post urlrewriter code where the forum is in a subfolder (~/forum). Thank you very much. 👍

Originally Posted by: johnk 

No that wouldn't work the url needs to include if its a topic and the topic id. something like would work...

http://forum.yetanotherforum.net/posts/59725-Bug-in-URLrewriter-config 

But to make this work the source code needs to be modified. I could create a working solution for that.

johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
That would be very helpful. Can the post ID be at the end of the URL? As you know, Google looks at the URL as part of SEO. It would probably rank URL with Post ID at the end higher (than post ID added in the beginning).


http://forum.yetanotherforum.net/post/Bug-in-URLrewriter-config-59725

http://forum.yetanotherforum.net/post/59725-Bug-in-URLrewriter-config

Some people may also be confused on why there is a random 5 digit number at the beginning of the URL. Moving it to the end would look better.

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago
Removing .aspx would be nice in the URL's.

As there is no way of removing the TopicID (and/or MessageID) from the URL because that's how YAF knows which messages to display, I think this would be nice and less confusing for those baffled by the numerical digits.

http://forum.yetanotherforum.net/topic/15525/Bug-in-URLrewriter-config
johnk
  • johnk
  • 74.8% (Friendly)
  • YAF All-the-Time Topic Starter
11 years ago
If forum is in a subfolder, would the url be?


http://www.yetanotherforum.net/forum/post/Bug-in-URLrewriter-config-59725

In that case, this could look better:


http://www.yetanotherforum.net/forum/post-Bug-in-URLrewriter-config-59725

Zero2Cool
  • Zero2Cool
  • 100% (Exalted)
  • YAF Leader YAF Version: YAF 3.1.16
11 years ago
oops ... if the forum is in a subfolder then below I think would make more sense and looks cleaner (just my opinion) than having the TopicId or MessageId appended to the end of the link.

http://forum.yetanotherforum.net/forum/topic/15525/Bug-in-URLrewriter-config

This is just my two cents, but I think having /forum/topic/#### is more efficient and beneficial because if someone links to a topic and the description/title changes, what's that do to your link? Does it kill it or does YAF to have to know that the last - separator is the Id?

I could be a bit partial to this because it's somewhat similar to MVC which I hope YAF moves to 🙂