boomhauer
  •  boomhauer
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2008-12-02T22:44:31Z
URL rewriting looks like it works ok in this release. But i was curious how I can change hte prfix used in all the rules, "yaf_..." to be something more site specific. I replaced this with, lets say "mysitename_..." but the site still generates links with yaf_ prefixes... is this something that can be changed in the binary release or would i need to dig into the source version to find where i can change this?

thanks
Sponsor
Lac
  •  Lac
  • 89.60001% (Honored)
  • YAF Forumling
2008-12-03T20:08:46Z
boomhauer wrote:

URL rewriting looks like it works ok in this release. But i was curious how I can change hte prfix used in all the rules, "yaf_..." to be something more site specific. I replaced this with, lets say "mysitename_..." but the site still generates links with yaf_ prefixes... is this something that can be changed in the binary release or would i need to dig into the source version to find where i can change this?

thanks

In sources.
"yaf_" prefix is need only to identify what is yaf rules, there is no needs to replace it. You need it only to hide what you use yaf, but this is wrong needs.

Jaben
  •  Jaben
  • 100% (Exalted)
  • YAF Developer
2008-12-03T22:51:29Z
You'd need to modify and recompile the base code in YAF. Take a look at the YAF.Classes.Utils folder and the URLRewriter folder.
boomhauer
  •  boomhauer
  • 52.4% (Neutral)
  • YAF Forumling Topic Starter
2008-12-04T17:56:00Z
vonhatnam100689
2010-11-23T03:37:34Z
Originally Posted by: Jaben 

You'd need to modify and recompile the base code in YAF. Take a look at the YAF.Classes.Utils folder and the URLRewriter folder.


you detailed instructions okay? I do not understand

juju
  •  juju
  • 72.2% (Friendly)
  • YAF Lover
2011-04-12T09:19:27Z
Originally Posted by: Jaben 

You'd need to modify and recompile the base code in YAF. Take a look at the YAF.Classes.Utils folder and the URLRewriter folder.



The YAF.Classes.Utils Folder is not there anymore in 1.9.5.5, only the YAF.Utils and it only has three folders: Extensions, Helpers and Structures. I went through SimpleURLParameterParser.cs and BaseUrlBuilder.cs in YAF.Classes.Config, but no luck.

Any tips? Thanks
hmmmm.... click thanks if my posts are useful
nordic
2011-06-19T18:21:03Z
Originally Posted by: Jaben 

You'd need to modify and recompile the base code in YAF. Take a look at the YAF.Classes.Utils folder and the URLRewriter folder.



Is not working.
logan
  •  logan
  • 100% (Exalted)
  • YAF Leader
2011-06-19T23:19:22Z

app.config


<add key="YAF.EnableURLRewriting" value="true" />
<add key="YAF.UrlRewritingPrefix" value="YOWZAH-"/>


Urlrewriter.config Change prefixs to match

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

test
vonhatnam100689
2011-07-19T02:25:46Z
Originally Posted by: logan 


app.config


<add key="YAF.EnableURLRewriting" value="true" />
<add key="YAF.UrlRewritingPrefix" value="YOWZAH-"/>


Urlrewriter.config Change prefixs to match

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


I have done. Thank you very much.
bhatnagarashish
2011-08-01T07:19:09Z
Thanks for sharing this knowledgeable post. I like it .Keep sharing this type of interesting topics.
hoclaptrinhweb
2012-03-12T13:07:15Z
Originally Posted by: logan 


app.config


<add key="YAF.EnableURLRewriting" value="true" />
<add key="YAF.UrlRewritingPrefix" value="YOWZAH-"/>


Urlrewriter.config Change prefixs to match

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


Thanks

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved