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, 09:30:01

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

I made a new folder in my files and visited with the .htaccess file indicated on the mod_rewrite guide, and I have no errors.

It shows me a list of contents / directory, .htaccess file missing.

Index of /n13/test
[ICO] Name Last modified Size Description
[DIR] Parent Directory -
#1026
Chris
Posted on 18 Oct 2009, 09:39:18

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

Ok here's a test I just did that will basically confirm if mod_rewrite is working correctly.

In your main www directory create a file called test.php, inside it put this code

Code:
<?php
echo "test success";
?>


then put a .htaccess in the www aswell, and inside that put this code

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /test.php [L]


Now if you try going to a url that doesn't exist like http://localhost/wadsdsadsa

it should say "test success"
#1030
Last edited by Chris at 2009-10-18 09:39:48 Reason:
Annika
Posted on 18 Oct 2009, 09:51:48

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

[img]http://i36.tinypic.com/2yufw5i.png[/img]
:cry:
#1035
Chris
Posted on 18 Oct 2009, 09:54:58

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

This is good, it means mod-rewrite is working.

Ok can you edit the .htaccess file in the news directory so it has this code

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /news/index.php [L]


Leave it in the news directory but make a copy of it and put it in the www directory, then try clicking a comment link, can you paste the URL the comment link tries to go to.
#1036
Annika
Posted on 18 Oct 2009, 10:30:06

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

It tries to go here:

http://localhost/news/1/0/Welcome-to-N-13-News-3-3.html

It gives me 500 internal server error. At least it's not giving me a 404 :wink:
#1037
Last edited by Annika at 2009-10-18 10:31:01 Reason:
Chris
Posted on 18 Oct 2009, 10:43:58

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

Ok hopefully this should work. in you www directory, create index.php, inside it put

Code:
<?php
include 'news/index.php';
?>


Edit the .htaccess in www so it looks like

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /index.php [L]


Now remove the .htaccess file that's in the news directory. Try the comment links now to see if they work.
#1038
Annika
Posted on 18 Oct 2009, 19:45:07

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

I think it ends up doing the same thing as before...

Not Found

The requested URL /news/1/0/Welcome-to-N-13-News-3-3.html was not found on this server.
#1040
1 2
Network-13.com © 2013