Webmastersite.net
Register Log In

url rewrite problems

Comments on url rewrite problems

babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 24, 2007 - 11:28 AM:

I'm not having much luck at all with the rewrite. Tested it a few versions ago and it seemed fine. With this site I did have it working, then decided to change the format of the rewrite for details. After changing I regenerated everything.

The categories work fine, but click on details and you just get a 404 error.

I don't understand the .htaccess at all, but here is what mine is....

Options +FollowSymlinks

RewriteEngine on

RewriteBase /

RewriteCond %{REQUEST_FILENAME} -d

RewriteRule ^(.+[^/])$ $1/ [R]



RewriteRule ^admin/?$ admin/index.php

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 ^detail/([-_/+A-Za-z0-9äüößèà ]+)-([0-9]+).html$ link.php?action=detail&id=$2

RewriteRule ^/([-_/+A-Za-z0-9äüößèà ]+)-([0-9]+).html$ link.php?action=detail&id=$2


Under the FTP info I have put the exact info I use to upload my files

WSN Links is in the root of my site.





Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 25, 2007 - 3:40 AM:

So what format did you set for them?

By the way rewriting is unrelated to regeneration, it does nothing.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 25, 2007 - 4:25 AM:

Paul wrote:
So what format did you set for them?


detail/{LINKTITLE}.html

It was detail/{LINKTITLE}-(LINKID}.html I just removed the -(LINKID}

Paul wrote:
By the way rewriting is unrelated to regeneration, it does nothing.


LOL! oh well <G> Perhaps one day I shall learn to leave well alone if it ain't broke!
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jan 29, 2007 - 2:33 AM:

If there's no link id involved then it has no way to determine what link you want. It's not like category rewriting, it removes all sorts of characters so there's no way to accurately calculate based on the name.
babrees
Expert

Usergroup: Customer
Joined: Aug 19, 2005
Location: England

Total Topics: 391
Total Comments: 1303
babrees
Posted Jan 29, 2007 - 5:23 AM:

Paul wrote:
If there's no link id involved then it has no way to determine what link you want. It's not like category rewriting, it removes all sorts of characters so there's no way to accurately calculate based on the name.



OH! (lightbulb come on!) Thanks Paul, it's working now smiling face
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.