EDIT: sorry I couldn't edit in the version, which is 3.20b2
Hi, clean install of 320 latest release, no changes anywhere. Never any problems with 3.13 I wanted to testrun the mod_rewrite. Script is in /links. Directory set to http://www.mydomain.com/links in general settings. Everything works fine, untill I enable mod_rewrite.
however, links don't work: http://www.mydomain.com/links/links/1 goes to that exact address and gives "The requested page does not exist." instead of the external url.
Comments on mod_rewrite
Beginner
Usergroup: Member
Joined: Nov 13, 2004
Total Topics: 3
Total Comments: 8
EDIT: sorry I couldn't edit in the version, which is 3.20b2
Hi,
clean install of 320 latest release, no changes anywhere.
Never any problems with 3.13
I wanted to testrun the mod_rewrite.
Script is in /links.
Directory set to http://www.mydomain.com/links in general settings.
Everything works fine, untill I enable mod_rewrite.
category rewrite works fine:
http://www.mydomain.com/links/Catname
however,
links don't work:
http://www.mydomain.com/links/links/1
goes to that exact address and gives
"The requested page does not exist."
instead of the external url.
I've read
which seems to be what it's all about,
but I haven't figured what I need to do to fix the problem.
I was just going to post the .htaccess when I saw what the problem is
original:
RewriteEngine on
# If not working, uncomment and correctly fill the line below:
RewriteBase /links
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]
RewriteRule ^admin$ admin/index.php
RewriteRule ^admin/$ admin/index.php
RewriteRule ^link/([a-z]+)/([0-9]+)/?$ link.php?action=$1&id=$2
RewriteRule ^link/([0-9]+)/?$ link.php?id=$1
RewriteRule ^thread/([0-9]+)/?$ comments.php?id=$1
RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?id=$1&page=$2
RewriteRule ^([0-9]+)/?$ index.php?action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?action=displaycat&catid=$1&page=$2
RewriteRule ^([-_/\+A-Za-z0-9]+)$ index.php?action=displaycat&catname=$1
RewriteRule ^links/([-_/\+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2
modified (in bold):
RewriteEngine on
# If not working, uncomment and correctly fill the line below:
RewriteBase /links
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]
RewriteRule ^admin$ admin/index.php
RewriteRule ^admin/$ admin/index.php
RewriteRule ^link/([a-z]+)/([0-9]+)/?$ link.php?action=$1&id=$2
RewriteRule ^link/([0-9]+)/?$ link.php?id=$1
RewriteRule ^links/([a-z]+)/([0-9]+)/?$ link.php?action=$1&id=$2
RewriteRule ^links/([0-9]+)/?$ link.php?id=$1
RewriteRule ^thread/([0-9]+)/?$ comments.php?id=$1
RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?id=$1&page=$2
RewriteRule ^([0-9]+)/?$ index.php?action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?action=displaycat&catid=$1&page=$2
RewriteRule ^([-_/\+A-Za-z0-9]+)$ index.php?action=displaycat&catname=$1
RewriteRule ^links/([-_/\+A-Za-z0-9]+)-([0-9]+).html$ link.php?action=detail&id=$2
this works fine (so far). I suppose you could chuck the "link"-lines. I kept them while trying the "links"-rewrite.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Thanks.