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 showing 404 error
1 2
Sallyc
Posted on 03 Mar 2011, 12:21:16

Access: Member
Total Posts: 61
Joined: 2011-02-25

I'm obviously doing something wrong, but have been unable to isolate the problem.

I have N-13 installed in the /news directory so the path to the news file is domain.com/news/index.php.

I have links to the news file installed on domain.com/index.php and domain.com/blog.php

My .htaccess file is located in my root directory and says:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*/index.php [L]
My N-13 admin panel has Friendly URL's enabled
File extension: .php
Prefix: /news/
Directory filename: index.php

When I click on Full Story I get:
http://domain.com/news/CorrectFriendlyURL.php but it's a 404. I tried removing the /news/ prefix and various other changes, but I can't get past some variation on the 404 error.

Edit: I forgot to mention that my .htaccess file is in the /htdocs folder but my domain is in htdocs/domainname/

So my question is how should I set these parameters?

Thank you for your help.
#3299
Last edited by Sallyc at 2011-03-03 13:33:47 Reason:
Chris
Posted on 03 Mar 2011, 17:22:04

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

Have you tried placing the .htaccess file in your root directory?
#3305
Sallyc
Posted on 03 Mar 2011, 19:16:29

Access: Member
Total Posts: 61
Joined: 2011-02-25

Hi Chris.

At first I had it in my /htdocs folder. But I just now also put it in my /htdocs/domainname/ folder. Still got a 404 - with a friendly URL.

Then, just to try everything I could think of, I removed
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*/index.php [L]
from the one in the /htdocs folder but left it in the one in the /htdocs/domainname/ folder. Still no joy. The URL was:
http://www.domainname.com/news/5-0-How-much-Vitamin-D-do-you-really-need.php but the error said:
The requested URL /~2424045.2657060/htdocs/domainname/news/5-0-How-much-Vitamin-D-do-you-really-need.php was not found on this server.

It seems so close, but obviously not right. I hope you have an idea of what's wrong.
Thanks.
#3306
Chris
Posted on 03 Mar 2011, 19:26:22

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

Below the "RewriteEngine On" line, try adding the following

Code:
RewriteBase /


I'm reading a couple different sites regarding how network solutions handles .htaccess files weirdly, some of them suggest adding the RewriteBase line whilst others say it did nothing so it's worth a try.
#3307
Sallyc
Posted on 03 Mar 2011, 19:33:10

Access: Member
Total Posts: 61
Joined: 2011-02-25

No difference. I put it in both directory spots. :(
#3308
Sallyc
Posted on 05 Mar 2011, 15:03:58

Access: Member
Total Posts: 61
Joined: 2011-02-25

This is really driving me nuts, Chris. I've been fiddling with various parameters trying to get it to work. It might be partly that I have my site installed in a subdir of my root. I don't have anything pointing to my root folder, but several subdirs with domains pointing to them. So my root dir is /htdocs/ but this site is in htdocs/spyglasshill/ and the N-13 files are installed in htdocs/spyglasshill/news.

Realizing that, and that my blog page is in htdocs/spyglasshill/blog.php, tell me if what I'm doing seems correct to you:

My .htaccess is in my /htdocs/ folder and says:

RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*/spyglasshill/blog.php [L]
I do believe that the /htdocs/ folder, not /htdocs/spyglasshill/ is correct because I wanted a custom 404 error message for another site and even though the domain pointed to that specific subdir, the .htaccess had to be placed in the /htdocs/ folder for it to work. For the sake of eliminating other variables, I've removed the custom 404 code from the .htaccess file and it only contains what's above.

Without Friendly URL's turned on, clicking on Read More displays the correct page and the URL is http://www.spyglasshill.com/blog.php?id=2

Then I set my N13 admin page to:
Enable Friendly URLS: Yes
File Extension: .php
Prefix: /news/
File: index.php

With Friendly URL's turned on, there is a 404 and the URL is:
http://www.spyglasshill.com/news/2-0-The-Power-of-the-Placebo-on-Pharmaceuticals.php

So I removed the /news/ prefix from my N13 admin (even though it seems it should be there) and then clicking on Read More gives a 404 and the URL is:
http://www.spyglasshill.com/2-0-The-Power-of-the-Placebo-on-Pharmaceuticals.php

which I would think should display the page, not a 404. But I'm not really sure what a functioning Friendly URL is supposed to look like since I've never been able to get one.

I hope you have some ideas. I really want this to work.
Thank you.
#3321
Chris
Posted on 07 Mar 2011, 15:47:45

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

Pretty much everything you've listed is what I would suggest to try and get it working. Only thing I can think of doing is if you give me access to the server I can play around with it to see if I can find out what's going on.
#3323
Sallyc
Posted on 07 Mar 2011, 17:37:12

Access: Member
Total Posts: 61
Joined: 2011-02-25

Thanks. I would really appreciate it and have pm'd you the info.
#3325
Sallyc
Posted on 08 Mar 2011, 11:11:26

Access: Member
Total Posts: 61
Joined: 2011-02-25

Thank you so much for helping get this to work Chris. I would never have thought of what you did, and honestly am not sure why some of it makes a difference. But I'm so happy to have it working correctly!:new_grin:

Thank you!!!
#3330
Gosain
Posted on 21 Apr 2011, 13:43:20

Access: Member
Total Posts: 14
Joined: 2009-10-25

I am also having the same 404 not found problem. I have also tried everything but clicking on friendly url generated by the N-13, I get this error.

Can u please tell me what is done to make it work?

Thanks.
#3437
1 2
Network-13.com © 2013