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 FriendlyURLs : fullstory showing EVERYTHING
aningbo
Posted on 14 Feb 2012, 10:00:53

Access: Member
Total Posts: 14
Joined: 2012-02-14

Everything works fine until i switched on the FriendlyURLs.

My script is installed in a folder: "my-article-blog" and i have the FriendlyURLs set to

Enable friendly URLs: Yes File extension: .html Prefix: /my-article-blog/ Directory filename: index.html

Template file to link to the fullnews:

<a href="my-article-blog/0-{id}-{friendlytitle}">{title}</a>

I tried with:

<a href="my-article-blog/{id}-0-{friendlytitle}">{title}</a>

This is what i have used in the my-article-blog.php to show the full news. I tried with and without $news_layout=2:

<?php $news_layout = '2'; include 'my-article-blog/index.php'; ?>

my .htaccess page looks like this:

RewriteEngine On RewriteCond %{REQUESTFILENAME} !-f RewriteCond %{REQUESTFILENAME} !-d RewriteRule .* /my-article-blog.php [L]

The fullnews page shows all the articles and without the comment from Disqus. Also, every link to the fullnews takes me to the same page with all the articles. I have look everywhere but this one seems a little unique and there's no such issue so far.

#3710
Last edited by aningbo at 2012-02-18 05:33:44 Reason: the previous issue got resolved.
Chris
Posted on 17 Feb 2012, 18:35:41

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

Can you show me your site either by posting a link here or sending me a private message so that I can have a look at exactly what it's doing.

#3731
aningbo
Posted on 17 Feb 2012, 19:15:50

Access: Member
Total Posts: 14
Joined: 2012-02-14

I have PM you the details with the FriendlyURL enabled on a website i don't use currently.

Please do let me know how you did it since i'll have to do it again on the live site which is now using the normal linking.

Thank You so much.

#3734
aningbo
Posted on 18 Feb 2012, 05:33:44

Access: Member
Total Posts: 14
Joined: 2012-02-14

Chris wrote:

The problem ended up being a bug in the system that I overlooked. What was causing it was the directory you chose to to install the script to my-article-blog, the hyphens in the URL were breaking friendly URLs from working properly.

I made a small change to the script to fix this. config.php, around line 134~ you'll see this code

$url = explode("-",$SERVER['REQUESTURI']); $g = explode("/", $url['0']); $g['2'] = (empty($g['2'])) ? '' : $g['2']; $url['0'] = $g['2']; I replaced it with the following

$url = explode("/",$SERVER['REQUESTURI']); $url = explode("-",$url['2']);

which seems to have fixed the problem. I'll make a note of this and have it fixed in a future update.

#3739
Network-13.com © 2013