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?
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.
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.
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.
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.
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).
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.
Comments on mod_rewrite problem on just one category
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
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
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I obviously need to know the details of the category at issue.
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Member
Usergroup: Customer
Joined: Feb 18, 2008
Total Topics: 8
Total Comments: 31
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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).