Ok, I am totally stuck. I've spent hours on this today, and I can't figure out what is going on.
This is my .htaccess file:
RewriteEngine On
RewriteRule ^articles/([0-9]+)/([a-zA-Z0-9\-]+)$ /article.php?id=$1 [L]
RewriteRule ^articles/([0-9]+)/([0-9]+)/([a-zA-Z0-9\-]+)$ /article.php?id=$1&page=$2 [L]
RewriteRule ^topics/([0-9]+)/([a-zA-Z0-9\-]+)$ /topic.php?id=$1 [L]
RewriteRule ^topics/(.+)$ /sub-topic.php?topic=$1 [L]
RewriteRule ^authors/([0-9]+)/([a-zA-Z0-9\-]+)$ /author.php?id=$1 [L]
RewriteRule ^preview/([0-9]+)/([a-zA-Z0-9\-]+)$ /preview.php?id=$1 [L]
ErrorDocument 400 /error?id=badrequest
ErrorDocument 401 /error?id=authreq
ErrorDocument 403 /error?id=forbidden
ErrorDocument 404 /error?id=notfound
ErrorDocument 500 /error?id=server
the part i am struggling with is the last rewrite rule, for "preview." It is a copy of the rewrite rule for "articles," but it will NOT pass the variable.
So, for instance:
www.domain.com/articles/4/the-title is passing the $id (4) to article.php with no problems.
www.domain.com/preview/4/the-title is NOT.
I know it is not a problem with the code on the page. Can anyone point me in the right direction?
FYI, this is on a Godaddy server that has always worked with no problems in the past.
THanks!