Webmastersite.net
Register Log In

URL rewrite question
question about apacherewrite

Comments on URL rewrite question

bobs12
Beginner

Usergroup: Member
Joined: Mar 01, 2007

Total Topics: 1
Total Comments: 1
bobs12
Posted Mar 01, 2007 - 2:18 AM:

Hi - first off, WSN forum is great!

Now, the problem - if I turn on URL rewriting in the control panel, everything works great except all the url's in the template get the full site url prepended, i.e. an absolute url pointing to the site root <a href="/"> becomes <a href="http://www.mydomain.com/forum//"> unless I write out the entire url in the template.

Am I missing something, or is there an easy way round this?

I tried looking through the source code for the part that creates the url's... but I couldn't find it sad

Could anyone point me to the script that does this? Then I guess I could turn rewrites off in the control panel and hard-code it into the script...?

I generally use rewrites anyway, as I think query strings all over the place are just ugly, never mind the SEO implications smiling face
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Mar 01, 2007 - 9:18 PM:

It does automatically prepend them because if it didn't, all relative url references would cease working when viewing a forum. A forum becomes site.com/forum-name/subforum-name and is thus considered a subdirectory, breaking relative urls.

Why do you want to not let it prepend?

To link to the forum root, <a href="{DIRURL}"> does the job and has the advantage that it stays up to date if you change your url. To link to a website homepage outside the forum, <a href="{MYURL}"> works if you have the site url filled into the system settings.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.