PDA

View Full Version : Top links broken


pk698
09-21-2007, 05:58 PM
Couldn't find this in search.

My top links, popular links, random links, all do not work.

I get a 404 error "not found".

www.cambodiahub.com

What am I doing wrong? Thanks.

WTM
09-21-2007, 06:24 PM
Looks like .htaccess file is missing on your installation. Make sure it's there and it looks exactly like the one that came with the script

pk698
09-21-2007, 07:38 PM
RewriteEngine On

RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^index([0-9]+).html$ index.php?category=&page=$1 [QSA,L]
RewriteRule ^index.html$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index.html$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

RewriteRule ^([a-z]+)-listings.html$ listings.php?view=$1 [QSA,L]
RewriteRule ^([a-z]+)-listings([0-9]+).html$ listings.php?view=$1&page=$2 [QSA,L]

RewriteRule ^([^/]+)-l([0-9]+).html$ view-listing.php?title=$1&id=$2 [QSA,L]
RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-listing.php?cat=$1&title=$2&id=$3 [QSA,L]


++++++++++++++++++++++++++++++++++++++



That's what I have in my .htaccess file

pk698
09-24-2007, 05:25 AM
Uh.... so any advice on this? The problem still exists...

Dave Baker
09-24-2007, 06:11 AM
Hello pk698,
Please send me PM with your ftp credentials.

Dave Baker
09-24-2007, 09:36 AM
pk698,
For some reasons from your .htaccess were removed the rules intended for those pages. I've restored your .htaccess. Please be careful in the next time. :)

pk698
09-24-2007, 04:38 PM
OK, thank you for fixing it.

Dave Baker
09-25-2007, 04:40 AM
You are welcome pk698!

belgirl
10-18-2007, 06:03 PM
I am having the same problem. This is what is in my .htaccess file:

# enable mod_rewrite
RewriteEngine on

# correct urls for yahoo bot
RewriteCond %{REQUEST_URI} !\..+$
RewriteCond %{REQUEST_URI} !/$
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]

# mod_rewrite rules for categories pages
RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

# mod_rewrite rule for suggest link page
RewriteRule ^suggest-link([0-9]+).html$ suggest-link.php?id=$1 [QSA,L]

# mod_rewrite rules for new links page
RewriteRule ^new-links.html$ new-links.php [QSA,L]
RewriteRule ^new-links([0-9]+).html$ new-links.php?page=$1 [QSA,L]

# mod_rewrite rules for top links page
RewriteRule ^top-links.html$ top-links.php [QSA,L]
RewriteRule ^top-links([0-9]+).html$ top-links.php?page=$1 [QSA,L]

# mod_rewrite rules for popular links page
RewriteRule ^popular-links.html$ popular-links.php [QSA,L]
RewriteRule ^popular-links([0-9]+).html$ popular-links.php?page=$1 [QSA,L]

# mod_rewrite rules for editors links page
RewriteRule ^editor-links/index.html$ editor-links.php [QSA,L]
RewriteRule ^editor-links/index([0-9]+).html$ editor-links.php?page=$1 [QSA,L]

# mod_rewrite rules for view link page
RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-link.php?cat=$1&title=$2&id=$3 [QSA,L]

# mod_rewrite rules for news page
RewriteRule ^news.html$ news.php [QSA,L]
RewriteRule ^(.*)-n([0-9]+).html$ news.php?title=$1&id=$2 [QSA,L]

# mod_rewrite rules for additional pages
RewriteRule ^p(.*).html$ page.php?name=$1 [QSA,L]

# mod_rewrite rules for error pages
RewriteRule ^([0-9]+).htm$ error.php?error=$1 [QSA,L]

# mod_rewrite rules for suggest link page
RewriteRule ^suggest-link-([0-9]+).html$ suggest-link.php?id=$1 [QSA,L]

# mod_rewrite rules for suggest category page
RewriteRule ^suggest-category-([0-9]+).html$ suggest-category.php?id=$1 [QSA,L]

# Google Sitemap
RewriteRule ^sitemap.xml$ google-sitemap.php [QSA,L]

# Yahoo site feed
RewriteRule ^urllist.txt$ yahoo-feed.php [QSA,L]

ErrorDocument 500 /dir/500.htm
ErrorDocument 404 /dir/404.htm
ErrorDocument 403 /dir/403.htm
ErrorDocument 401 /dir/401.htm

RewriteBase /links/

Can anyone help??? (using free version 1.6)

Simon Gooffin
10-19-2007, 06:40 AM
Hi Belgirl,
Welcome here. Try to insert this line

RewriteBase /links/

right after
RewriteEngine on

And please post your questions related to pro version in our Pro forums area

belgirl
10-19-2007, 04:45 PM
I'm not using the pro-version. However, I had the wrong .htaccess file and tech support emailed me the correct one for version 1.6 (free) so problem has been solved.

RoadRashTX
10-25-2007, 08:56 PM
I'm not using the pro-version. However, I had the wrong .htaccess file and tech support emailed me the correct one for version 1.6 (free) so problem has been solved.



So what is proper htaccess file? the one I have which was in the 1.6 download is below. But I still have the problems with the links not working right. And also, the emails that go out to the person submitting a link are messed up.

Where it is suppose to tell them the url they submitted it reformats their url to some like http://www.mydomain.com/test-l4.html

Where their url that was submitted was actually test.com



RewriteEngine On

RewriteRule ^(.*)/$ index.php?category=$1 [QSA,L]
RewriteRule ^index([0-9]+).html$ index.php?category=&page=$1 [QSA,L]
RewriteRule ^index.html$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index.html$ index.php?category=$1 [QSA,L]
RewriteRule ^(.*)/index([0-9]+).html$ index.php?category=$1&page=$2 [QSA,L]

RewriteRule ^([a-z]+)-listings.html$ listings.php?view=$1 [QSA,L]
RewriteRule ^([a-z]+)-listings([0-9]+).html$ listings.php?view=$1&page=$2 [QSA,L]

RewriteRule ^([^/]+)-l([0-9]+).html$ view-listing.php?title=$1&id=$2 [QSA,L]
RewriteRule ^(.*)/(.*)-l([0-9]+).html$ view-listing.php?cat=$1&title=$2&id=$3 [QSA,L]