Webmastersite.net
Register Log In

problem with URL rewrites after upgrade

Comments on problem with URL rewrites after upgrade

Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Apr 24, 2008 - 12:17 PM:

Last night I discovered my host's switch to PHP5 had broken WSN Links, and immediately downloaded 4.1.39 for a long overdue upgrade. At first the category links weren't working properly; all were pointing to category #1. I regenerated the categories, set it to use upper and lowercase letters, and noticed that the format for category rewriting field in the SEO seection was blank, and filled it with {CATREWRITEPATH}/{PAGE}.html.

I immediately got 500 server errors on each page until I reuploaded .htaccess and (hitting the back button) turned off URL rewriting. Now the category links look like they've been rewritten (http://www.customize-your-life.com/Clothing/Shoes, for example) but if clicked give me a 404 error, and reenabling rewriting gives me 500 errors.

Any ideas? Thanks.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 24, 2008 - 4:55 PM:

What are all the values on your Admin -> Settings -> SEO page rewriting section? Just post a screenshot.

Unrelated: I don't think your stylesheet is up to date, it looks odd, seems to be missing a lot of elements. Those should add automatically on upgrade so I'm not sure how they can be missing.

"We recommend you load this web site using Firefox" is a bit irritating, by the way... I happen to like Opera.
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Apr 26, 2008 - 1:44 AM:

Paul wrote:
What are all the values on your Admin -> Settings -> SEO page rewriting section? Just post a screenshot.

See attachment; it seems to happen any time rewriting is turned on or off, so I'm guessing there's a problem auto-writing the htaccess. I've tried changing the permissions (666, 755, 777) but no luck.

Paul wrote:
Unrelated: I don't think your stylesheet is up to date, it looks odd, seems to be missing a lot of elements. Those should add automatically on upgrade so I'm not sure how they can be missing.

Fixed.
Paul wrote:
"We recommend you load this web site using Firefox" is a bit irritating, by the way... I happen to like Opera.

It's just the default 404 page. All the more reason to get rid of it wink

Attached Files:
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 26, 2008 - 2:02 AM:

That all seems right. Have you tried resubmitting the SEO settings page as is to get the file regenerated? If it still doesn't work, post the .htaccess file contents.

until I reuploaded .htaccess

If you've been uploading it, that could be the problem. You're supposed to let it generate automatically.
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Apr 27, 2008 - 12:13 AM:

This was in the error log:
/public_html/.htaccess: RewriteRule: bad flag delimiters

Here's the .htaccess:

Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]

RewriteRule ^admin/?$ admin/index.php

RewriteRule ^members/([0-9]+)\.html?$ memberlist.php?rewritten=1&page=$1
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)-trader\.html?$ trader.php?rewritten=1&id=$2
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ memberlist.php?rewritten=1&action=profile&id=$2
RewriteRule ^members/?$ memberlist.php?rewritten=1
RewriteRule ^help/?$ help.php?rewritten=1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/?$ help.php?rewritten=1&action=showcat&name=$1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ help.php?rewritten=1&action=showitem&id=$3


RewriteRule ^tags/([a-zA-Z0-9]+)/?$ search.php?rewritten=1&filled=1&action=filter&whichtype=links&tagscondition=like&tagssearch=|$1|

RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?rewritten=1&id=$1&page=$2
RewriteRule ^thread/([0-9]+)/?$ comments.php?rewritten=1&id=$1
RewriteRule ^links/[-_/\+A-Za-z0-9]+-([0-9]+)\.html?$ link.php?rewritten=1&action=detail&id=$1

RewriteRule ^lists/?$ albums.php?rewritten=1
RewriteRule ^lists/[-_/\+A-Za-z0-9]+-([0-9]+)/?$ albums.php?rewritten=1&catname=$1
RewriteRule ^lists/[-_/\+A-Za-z0-9]+-([0-9]+)/([0-9]+)\.html?$ albums.php?rewritten=1&catname=$1&page=$2
RewriteRule ^([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1&page=$2
RewriteRule ^([0-9]+)/sp([0-9]+).htm$ index.php?rewritten=1&action=displaycat&catname=$1&subpage=$2
RewriteRule ^([-_/\+A-Za-z0-9]+)/ ?$ index.php?rewritten=1&action=displaycat&catname=$1
RewriteRule ^([-_/\+A-Za-z0-9]+)/([0-9]+)\.html ?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 27, 2008 - 12:25 AM:

According to a google, "bad flag delimiters usually means an extra or unescaped space in a regex pattern, or a missing [ or ]"... but I don't see any of that there.

If you can send me access I'll mess around with it until I figure it out. It may relate to the particular combination of switches you have, somehow.

Edit: I'll try copying the file to my site first.

Second edit: got it to produce an internal server error on my site, so I should be able to track it down.
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
Posted Apr 27, 2008 - 12:44 AM:

Do you have a blank space at the end of your format for rewriting help items, or is that the forum's autospacing? Then there's the space between k and s here:
search.php?rewritten=1&filled=1&action=filter&whichtype=link
s&tagscondition=like&tagssearch=|$1|

Please re-post using the code tags or send by email so I know if the spaces are post formating or bugs.

Once I remove the extraneous spaces, the file you posted works fine for me. If it doesn't for you then I'll need server access to try to figure out how your server differs.
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Apr 27, 2008 - 11:24 AM:

Paul wrote:
Do you have a blank space at the end of your format for rewriting help items, or is that the forum's autospacing?

Didn't find one.

Then there's the space between k and s here:
search.php?rewritten=1&filled=1&action=filter&whichtype=link
s&tagscondition=like&tagssearch=|$1|

Please re-post using the code tags or send by email so I know if the spaces are post formating or bugs.

Options +FollowSymlinks
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+[^/])$ $1/ [R]

RewriteRule ^admin/?$ admin/index.php

RewriteRule ^members/([0-9]+)\.html?$ memberlist.php?rewritten=1&page=$1
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)-trader\.html?$ trader.php?rewritten=1&id=$2
RewriteRule ^members/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ memberlist.php?rewritten=1&action=profile&id=$2
RewriteRule ^members/?$ memberlist.php?rewritten=1
RewriteRule ^help/?$ help.php?rewritten=1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/?$ help.php?rewritten=1&action=showcat&name=$1
RewriteRule ^help/([-_/\+A-Za-z0-9]+)/([-_/\+A-Za-z0-9]+)-([0-9]+)\.html?$ help.php?rewritten=1&action=showitem&id=$3


RewriteRule ^tags/([a-zA-Z0-9]+)/?$ search.php?rewritten=1&filled=1&action=filter&whichtype=links&tagscondition=like&tagssearch=|$1|

RewriteRule ^thread/([0-9]+)/([0-9]+)/?$ comments.php?rewritten=1&id=$1&page=$2
RewriteRule ^thread/([0-9]+)/?$ comments.php?rewritten=1&id=$1
RewriteRule ^links/[-_/\+A-Za-z0-9]+-([0-9]+)\.html?$ link.php?rewritten=1&action=detail&id=$1

RewriteRule ^lists/?$ albums.php?rewritten=1
RewriteRule ^lists/[-_/\+A-Za-z0-9]+-([0-9]+)/?$ albums.php?rewritten=1&catname=$1
RewriteRule ^lists/[-_/\+A-Za-z0-9]+-([0-9]+)/([0-9]+)\.html?$ albums.php?rewritten=1&catname=$1&page=$2
RewriteRule ^([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1
RewriteRule ^([0-9]+)/([0-9]+)/?$ index.php?rewritten=1&action=displaycat&catid=$1&page=$2
RewriteRule ^([0-9]+)/sp([0-9]+).htm$ index.php?rewritten=1&action=displaycat&catname=$1&subpage=$2
RewriteRule ^([-_/\+A-Za-z0-9]+)/ ?$ index.php?rewritten=1&action=displaycat&catname=$1
RewriteRule ^([-_/\+A-Za-z0-9]+)/([0-9]+)\.html ?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2

Once I remove the extraneous spaces, the file you posted works fine for me. If it doesn't for you then I'll need server access to try to figure out how your server differs.

PM on the way.
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
Posted Apr 27, 2008 - 12:09 PM:

Ok, the PM is not on it's way after all... you've disabled private messaging for your account, and your email support pages aren't working. Also, I can't seem to log on to my customer account here; it's not recognizing my email address or password, and I can't even find my account on the member list. *puzzled*
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
#10 - Quote - Permalink
Posted Apr 27, 2008 - 6:35 PM:

My email support pages are working. You need to figure out what email address you purchased with, or what you changed it to after purchase, or tell me your approximate date of purchase so I can give you a list of who you might be.

You still have two of the weird spaces in the code tags on the last two lines. When you look at the file yourself, do you actually see
RewriteRule ^([-_/\+A-Za-z0-9]+)/ ?$ index.php?rewritten=1&action=displaycat&catname=$1 
RewriteRule ^([-_/\+A-Za-z0-9]+)/([0-9]+)\.html ?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2
as was posted, or do you see
RewriteRule ^([-_/\+A-Za-z0-9]+)/?$ index.php?rewritten=1&action=displaycat&catname=$1 
RewriteRule ^([-_/\+A-Za-z0-9]+)/([0-9]+)\.html?$ index.php?rewritten=1&action=displaycat&catname=$1&page=$2
as it should be, and as works perfectly for me?
Michelle
Member

Usergroup: Customer
Joined: Sep 27, 2004
Location: New York City

Total Topics: 24
Total Comments: 46
#11 - Quote - Permalink
Posted Apr 27, 2008 - 11:52 PM:

Thanks Paul, I found the spaces and it works again. Now to redo my template...

I figured out my account, too. BTW, kudos on the automatic upgrade feature!

Here's what I get when I visit your support form though:

Attached Files:
Paul
developer

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

Total Topics: 61
Total Comments: 7867
Paul
#12 - Quote - Permalink
Posted Apr 28, 2008 - 9:52 PM:

Ah... your browser doesn't redirect after that? If I look quickly I can see it, but it moves on to the correct page after a half-second. Should be fixed in a few minutes anyhow.

Update: fixed.
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.