Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: Root Directory Problem  (Read 137 times)

joharm

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
Root Directory Problem
« on: February 04, 2013, 06:33:22 PM »

I have succesfully installed sNews and it seems to be working great apart from one thing.

I have the system set up at www.mydomain.co.uk/news.

Clicking on the title of an article successfully loads it at www.mydomain.co.uk/news/category/article-name
Clicking on a category title  successfully loads it at www.mydomain.co.uk/news/category

However all other links - e.g. all links in the admin area, clicking on an article in the category list page, the 'Home' link (all links in the breadcrumb) - show in the browser URL bar the full root path including my hosting company etc:

http://www.mydomain.co.uk/websites/123reg/LinuxPackage21/my/do/ma/mydomain.co.uk/public_html/news/....

Is there something I can amend easily in the snews.php file?
Logged

skian

  • Full Member
  • ***
  • Karma: 14
  • Posts: 120
Re: Root Directory Problem
« Reply #1 on: February 04, 2013, 07:31:09 PM »

Here is a (bad) replacement for function "site()" that should get you running. It is bad code because it requires that you hardcode the site url.

Code: [Select]
function site() {
return "http://www.mydomain.co.uk/news/";
}

Logged

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: Root Directory Problem
« Reply #2 on: February 05, 2013, 01:33:18 AM »

However all other links - e.g. all links in the admin area, clicking on an article in the category list page, the 'Home' link (all links in the breadcrumb) - show in the browser URL bar the full root path including my hosting company etc:

http://www.mydomain.co.uk/websites/123reg/LinuxPackage21/my/do/ma/mydomain.co.uk/public_html/news/....

Is there something I can amend easily in the snews.php file?

I've never come across this strange thing before. Can you share with us the source code being generated by this page?
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

joharm

  • Newbie
  • *
  • Karma: 0
  • Posts: 2
Re: Root Directory Problem
« Reply #3 on: February 05, 2013, 10:23:21 AM »

Here is a (bad) replacement for function "site()" that should get you running. It is bad code because it requires that you hardcode the site url.

Code: [Select]
function site() {
return "http://www.mydomain.co.uk/news/";
}


Thank you skian, this fix worked great.

I don't mind that the URL is hard coded.
Logged