Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: redirect problem ... need a hint!  (Read 3641 times)

amak

  • Newbie
  • *
  • Karma: 4
  • Posts: 40
redirect problem ... need a hint!
« on: September 10, 2009, 01:30:56 PM »

Hi,

i'm using 1.6 on one of my sites and i'm lost searching the forums here for hours ;)

The site works fine so far but it seems that i've a problem in any matter with a kind of direct links from searchengines.

If i'm calling an article or category directly like:

http://www.domain.com/category/article or http://www.domain.com/category/article/

snews redirects me to the 404 function at the first call. Once the browser is startet i'm calling the link again it redirects me to the right category/article.

Would be nice if anyone could give me a shorthand how to fix this!
Logged
Regards,
Amak

amak

  • Newbie
  • *
  • Karma: 4
  • Posts: 40
Re: redirect problem ... need a hint!
« Reply #1 on: September 15, 2009, 07:40:58 AM »

Still lost .. anyone could help please?
Logged
Regards,
Amak

Rui Mendes

  • Development,Testing, Support
  • Hero Member
  • *****
  • Karma: 195
  • Posts: 1009
  • sNews1.7
    • Comunidade Portuguesa
Re: redirect problem ... need a hint!
« Reply #2 on: September 15, 2009, 12:05:11 PM »

Hello amak

Try this:
- See if "db('website')" is ok
- Before you click no article see it status bar in your browser, what url is requested (if you use IE look it on bottom at left side)
- Change date_format
- Create a new category and new article and see if it happens the same way

Find this
Quote
$query = $query." ORDER BY id DESC";
and add this echo
Quote
echo $query;

tell me what you got

Find this lines and replace || by OR
Quote
$query = $query." (title LIKE '%$keywords[$j]%' || text LIKE '%$keywords[$j]%')";
      }
      else {$query = $query." (title LIKE '%$keywords[0]%' || text LIKE '%$keywords[0]%')";}


if you phpmyadmin, try put your queries and see if works or not
Logged
Need a Job on Europe. Linkdin - Facebook / Group

amak

  • Newbie
  • *
  • Karma: 4
  • Posts: 40
Re: redirect problem ... need a hint!
« Reply #3 on: September 22, 2009, 12:04:18 PM »

Hi Rui,

thanks for your hints .. i think i've described my problem not as good as i should, so i try again here ;)

snews is working fine ... including the search function and anything else.

Lets say we have the following url:

http://snewscms.com

and in snews we do have any content like a page called "page", so it would be:

http://snewscms.com/page


If i visit the site using http://snewscms.com and clicking onto the page anything works fine.

Now i'm restarting my firefox or ie or whatever and i'm typing the url directly into it:

http://snewscms.com/page

snews is redirecting me at the first call (of a freshly started browser) to the 404 function.

Once the browser is started and i'm getting back to the site and retyping:

http://snewscms.com/page

it directs me correctly to the content.

Strange and i'm lost ;)
Logged
Regards,
Amak

Joost

  • Guest
Re: redirect problem ... need a hint!
« Reply #4 on: September 22, 2009, 12:12:59 PM »

What do you mean by 'Once the browser is started" ?
Logged

amak

  • Newbie
  • *
  • Karma: 4
  • Posts: 40
Re: redirect problem ... need a hint!
« Reply #5 on: September 22, 2009, 06:25:37 PM »

What do you mean by 'Once the browser is started" ?

Simply Firefox isn't running ... and you're starting it.
Logged
Regards,
Amak