FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Regex to URL rewrite.
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Regex to URL rewrite. [message #32708] Mon, 17 July 2006 13:44 Go to next message
wonderwoman is currently offline  wonderwoman   United Kingdom
Messages: 3
Registered: July 2006
Karma: 0
Junior Member
HI,
I run some sites which people link to other sites from (kinda obvious). Most of these site have affiliate schemes and I'd like to utilise them. Is it possible to use the replacement system to rewrite things like www.fudforum.org/someplace/ to www.mysites.com/somephp.php?site=www.fudforum.org&dir=/someplace/. Hopefully you get the general idea. I want to make some money from the links from my site Smile

WW.
Re: Regex to URL rewrite. [message #32722 is a reply to message #32708] Mon, 17 July 2006 19:18 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can use mod_rewrite to do any URL rewrites that you like, it is a very powerful tool, although a bit tricky to use at times. There is nothing in the forum that precludes you from using it to rewrite urls.

FUDforum Core Developer
Re: Regex to URL rewrite. [message #32728 is a reply to message #32722] Mon, 17 July 2006 19:28 Go to previous messageGo to next message
wonderwoman is currently offline  wonderwoman   United Kingdom
Messages: 3
Registered: July 2006
Karma: 0
Junior Member
If I understand mod_rewrite correctly it rewrites urls internally, that is it rewrites the calls on my server or from my server to another, it does not modify html. What I wanted was to modify the html in my forums when someone posts a link to one of the other sites.
Re: Regex to URL rewrite. [message #32735 is a reply to message #32728] Mon, 17 July 2006 23:46 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Well, you can do that too, but you need to edit a bit of FUDforum code specifically the code that creates the _rsid constant inside users.inc.t The value of this constant is prefixed to all forum urls so you can pack additional parameters in there.

FUDforum Core Developer
Re: Regex to URL rewrite. [message #32739 is a reply to message #32735] Tue, 18 July 2006 00:05 Go to previous messageGo to next message
wonderwoman is currently offline  wonderwoman   United Kingdom
Messages: 3
Registered: July 2006
Karma: 0
Junior Member
Do I edit that to modify external links? I would have thought that was for internal links only?

Re: Regex to URL rewrite. [message #32747 is a reply to message #32739] Tue, 18 July 2006 16:18 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Oh sorry... that's for internal links only.

When it comes to external links, such as the ones embedded in messages you'd need to edit post_proc.inc.t where the FUDcode processor that generates the URLs can be found.


FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Forcing linked and uploaded pics into an IFRAME
Next Topic: Integrate With A Mailing List
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 06:11:52 GMT 2024

Total time taken to generate the page: 0.02717 seconds