YAFLogo

redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
16 years ago
I have some problem about Url Rewrite

I have removed yaf_ but my new url's same as

/topics2_Duyurular.aspx

/postst29269_Hasret-Sona-Erdi.html

but i want to

/Duyurular_tid2.aspx

/Hasret-Sona-Erdi_pidt29269.aspx

topics > tid

postst > pidt

How can i do that ?

Sponsor
redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
16 years ago
when i remove "yaf_" my active topics link be active.aspx and login links be login.aspx but not working linkls how can change that ?
Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
You need to modify UrlRewriter.config and remove the yaf_ requirement.
redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
16 years ago
hi jaben

i have been changed my urlrewriter.config to

but my forums link are have yaf_ and when i try to go

http://localhost:3435/seo/yaf_postsm30090_Sabaha.aspx#post30090 i take error but when i remove yaf in url i can see page for example

http://localhost:3435/seo/postsm30090_Sabaha.aspx#post30090 but my forum links have yaf_

redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
EP
  • EP
  • 63.8% (Friendly)
  • YAF Camper
16 years ago
I'm having the same issue, but haven't spent a whole lot of time searching these forums just yet.

I changed the prefix in the urlrewriter.config from "yaf_" to something else (the value does not matter) and as long as

<add key="EnableURLRewriting" value="true" />
it always uses "yaf_".

I can't get it to use a different value. I have dumped all the DLLs and rebuilt and touched the web.config, but it always uses "yaf_" no matter what.

Wanted to add that when I change the prefix, the site's links do not update, so links break, but if I manually update the url to use my desired prefix, the page will load.

redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
16 years ago
EP how can i update url manually.

you can remove yaf_ prefix in Yaf.Classes.Utils/URLBuilder/URLBuilderRewrite.cs line

// create "rewritten" url...

newURL = before + "yaf_";

change to

// create "rewritten" url...

newURL = before + "";

but if you make this login,search and member list links are not working.

Jaben
  • Jaben
  • 100% (Exalted)
  • YAF Developer
16 years ago
redLine, if you are asking these questions to get development help, realize I don't help with custom development.

That's my rule.

EP
  • EP
  • 63.8% (Friendly)
  • YAF Camper
16 years ago

EP how can i update url manually.

you can remove yaf_ prefix in Yaf.Classes.Utils/URLBuilder/URLBuilderRewrite.cs line

// create "rewritten" url...

newURL = before + "yaf_";

change to

// create "rewritten" url...

newURL = before + "";

but if you make this login,search and member list links are not working.

redLine wrote:

sorry, what I meant was that I could go to the browser and manually change the url/address to use my prefix and the page would load that way.

redLine
  • redLine
  • 74.8% (Friendly)
  • YAF MVP Topic Starter
16 years ago

redLine, if you are asking these questions to get development help, realize I don't help with custom development.

That's my rule.

Jaben wrote:

Sorry jaben i can't understand but when we changes only urlrewriter.config our forums links are don't working. I think we must change link for example

message.aspx

login.aspx

colossalc
16 years ago
If I understand you correctly, you need to modify URLBuilderRewrite.cs in the /classes folder to remove the yaf_ from there as well. Or change it from yaf_ to something else.

The urlrewriter.config must match the URLBuilderRewrite.cs.

kevinibm
  • kevinibm
  • 53.6% (Neutral)
  • YAF Forumling
16 years ago
I do have the same problem, but even after changing the

newURL = before + "yaf_";

to

newURL = before + "";

things are not working..

http://forum.yetanotherforum.net/yaf_postst6797_change-URL-rewritting-to-something-other-than-yaf.aspx 

I posted the concern here also.

Please anyone help