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 URLs not working
1 2
Annika
Posted on 18 Oct 2009, 08:40:50

Access: Member
Total Posts: 9
Joined: 2009-10-18

Hi there!

First of all, I'd like to say that I really like this script. It's simple, it's clean, it's just wonderful. Pretty much all of what I've been looking for is in N13.

There's just one setback. I can't get Friendly URLs to work. :noexpression:

In the Settings I've set it to these options:
Enable Friendly URLS: Yes
File Extension: /
Prefix: (blank)
Directory Filename: (blank)

I'm trying to go for website.com/news-title-here/ Instead of website.com/?id=2
Could someone help me out please? :blushing:
#1011
Last edited by Annika at 2009-10-18 08:41:58 Reason:
Chris
Posted on 18 Oct 2009, 08:50:08

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

Hi Annika,

I noticed a slight problem with friendly URLS. If you download and extract this file. Upload it to your server replacing your own copy of config.php this should correct the problem.

Now to get friendly URLs to work use these settings.

Code:
Enable friendly URLs: Yes
File extension: .html
Prefix: /news/
Directory filename: index.html


It should then work. If not try moving the .htaccess file to your main www directory.
#1012
Annika
Posted on 18 Oct 2009, 09:00:07

Access: Member
Total Posts: 9
Joined: 2009-10-18

Hi! Thank you for the speedy reply.

I've done what you said but now I get 404 error when I click on the comments link.
#1013
Chris
Posted on 18 Oct 2009, 09:01:30

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

Did you try moving the .htaccess file to the main directory?
#1014
Annika
Posted on 18 Oct 2009, 09:02:46

Access: Member
Total Posts: 9
Joined: 2009-10-18

Yes I did. Here are the contents of my .htaccess

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /news/index.php [L]
#1015
Chris
Posted on 18 Oct 2009, 09:05:16

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

Can you create a new file called phpinfo.php and inside it put this code

Code:
<?php
phpinfo
();
?>


then link me to that file so I can take a look at the server settings.
#1016
Annika
Posted on 18 Oct 2009, 09:11:35

Access: Member
Total Posts: 9
Joined: 2009-10-18

I forgot to mention that I'm working from a local server setup on my computer.

I've saved the data from the phpinfo.php and saved it online.

http://spookydot.net/phpinfo.php.htm

I feel kind of silly now and wonder if working on the actual server would make a difference. I'll update here when I've tried using friendly urls on the live server, too.

Edit: My live server isn't available. Been having a lot of downtime. :cry:
#1018
Last edited by Annika at 2009-10-18 09:15:35 Reason:
Chris
Posted on 18 Oct 2009, 09:18:27

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

If you're developing on your own local server, you need to have mod_rewrite enabled within apache for friendly URls to work.

if you edit your apache httpd.conf file and search for

Code:
#LoadModule rewrite_module modules/mod_rewrite.so


remove the # at beginning of that line

Then you need to search for a line of text that'll look like

Code:
<Directory "D:/www">


Except D:/www being whatever your document root is. Once you find that line, somewhere just below it you'll see

Code:
AllowOverride none


change that to

Code:
AllowOverride all


Save, restart your server and now hopefully friendly URls will work.
#1020
Last edited by Chris at 2009-10-18 09:19:25 Reason:
Annika
Posted on 18 Oct 2009, 09:22:09

Access: Member
Total Posts: 9
Joined: 2009-10-18

I've checked my httpd.conf file and the settings have already been set like you described above.

I'm stumped.
#1022
Chris
Posted on 18 Oct 2009, 09:24:51

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

This page shows you a quick way you can check if mod_rewrite is enabled. Give it a try to see if it works or not.
#1023
1 2
Network-13.com © 2013