Webmastersite.net
Register Log In

mod_rewrite problem on just one category
"Bad request" error on SEO-friendly link

Comments on mod_rewrite problem on just one category

impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Apr 04, 2008 - 4:35 PM:

This is very strange:

I've been using the mod_rewrite function and it has been working fine up to now. I recently added two new categories - one of them works fine, but the other one creates a broken link. When I load the SEO-friendly URL, I receive a "Bad request" error. However, the category page is reachable through the full link. (index.php?action=displaycat&catid=51) All of the other category links work fine.

I tried doing a full regenerate and clearing the cache, but that did not fix the problem. I also tried deleting the category and creating it again, but I get the same problem. I also made sure to update my .htaccess with the new upgrade. (Problem occurred in both 4.1.34 and 4.1.37) Is there anything else I should check on to troubleshoot this?

Thanks
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 04, 2008 - 9:52 PM:

I obviously need to know the details of the category at issue.
impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Apr 05, 2008 - 5:36 PM:

It is a regular, top level category with no secondary categories. All category settings are set to my defaults. There is nothing different about this category from the other categories in my directory. Here is the link to the seo-friendly URL and here's the link to the full URL. (Warning: contains adult material) Let me know what other details you need.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 06, 2008 - 4:45 PM:

Odd. Have you tried resubmitting the SEO settings page (to make sure the htaccess is up to date)?

I guess I'll have to step through it by FTP: scripts.webmastersite.net/w...dex.php?section=inspection
impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Apr 07, 2008 - 3:00 AM:

I tried resubmitting the SEO page, several times with different permissions on my .htaccess. Each time I also regenerated categories, but the link still is broken.

I submitted login details to you. Sometimes that ftp address may not work, so try using "ftp1" as the prefix instead of "ftp" if it isn't working.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 07, 2008 - 5:35 PM:

You set it to rewrite ampersands as "and". As the instructions there say, you have to choose something unique -- the way you did it, anything containing "and" in the URL is presumed to have & in the category name instead. So it looks for a category named "H&jobs" which doesn't exist.
impurist
Member

Usergroup: Customer
Joined: Feb 18, 2008

Total Topics: 8
Total Comments: 31
Posted Apr 07, 2008 - 8:19 PM:

Thanks Paul, I see what the problem was. There were no ampersands in the category name, so I figured that nothing would be replaced. Since the setting says "Replace ampersands with", it's not made clear that anything besides an ampersand will be replaced.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Apr 07, 2008 - 10:23 PM:

Several people have run into the same trouble before, so I'm adding a test that'll search existing categories for any instance of the ampersand rewrite term and refuse to accept the value if there are categories already using it.

Nothing besides an ampersand will be replaced in the category name. The problem is that the replacement of the ampersand has to be reversible in order to figure out what category was being referenced by the ampersand-free url (unless {CATID} is included in the rewrite scheme so that it can just jump to an id number).
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



Sorry, you don't have permission to post posts. Log in, or register if you haven't yet.