Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Friendly URL problems
Andrew009
Posted on 04 Mar 2011, 15:39:01

Access: Member
Total Posts: 2
Joined: 2011-03-04

I wondered if anyone can help. I've spent many hours working on this problem but seem to have hit the buffers.

I installed version 4.0 a few days ago, and love it. I've managed to get eveything up and running smoothly until it comes to transferring over to Friendly URLs.

I've been through all the hiccups in terms of getting the .htaccess settings right and the hidden whammy when you find that relative URLs (such as CSS and .js files) don't load as expected because the friendly URLs take you to a different directory.

Basically, the friendly URLs work just fine inside my RSS feed but when I set search=on before calling the news/index.php include, all the search results come up with ?id= whatever and because friendly is switched on, they will not display.

Any ideas as to why this might be happening?

Any help would be greatly appreciated.
#3316
Chris
Posted on 05 Mar 2011, 06:28:55

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Options > Templates > Edit the template you're using > Search Results

By default it looks something like this

Code:
<tr class="search_{oneortwo}"><td><a href="?id={id}">{title}</a></td><td>{date}</td><td>{author}</td><td>{categories}</td></tr>


Change it to this

Code:
<tr class="search_{oneortwo}"><td><a href="http://example.com/news/0-{id}-{friendlytitle}">{title}</a></td><td>{date}</td><td>{author}</td><td>{categories}</td></tr>
#3318
Andrew009
Posted on 07 Mar 2011, 19:20:40

Access: Member
Total Posts: 2
Joined: 2011-03-04

Thanks for the help Chris.

The changes to the N-13 template work fine. Unfortunately I am going to have to stick to SEO Unfriendly URLs because of the absolute addressing issue. I use Dreamweaver Templates and obviously, because the page I want the article viewed on uses a Dreamweaver Template, the .htaccess force into a non-existant directory completely throws the all the menu links etc. etc. no longer point to the right places.

Changing all links in the template to absolute addresses would undoubtedly fix the problem but the price I would pay in overall site speed is just too great a sacrifice. Using a different template for the new page would be another option but with a large site to update when I change the template remembering to update another one as well looks like a recipe for disaster.

I thought I could cheat by just setting the Friendly URL prefix to '/' but the .htaccess can't pick that up and besides, it would force all external requests for non-existant pages to the news page.

If you have any bright ideas, please share them, still love the program!
#3326
Chris
Posted on 08 Mar 2011, 06:34:49

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

I'm not sure I fully understand your problem so this may not be of any help at all. But instead of using absolute URLs for javascript/css includes, what about prefixing URLs with a /, for example change this

Code:
<link href="styles/v9style.css" rel="stylesheet" type="text/css" />


To this

Code:
<link href="/styles/v9style.css" rel="stylesheet" type="text/css" />


Which works pretty much the same as an absolute path.
#3328
Network-13.com © 2013