Webmastersite.net
Register Log In

Mod_rewrite writes subcat into number ?

Comments on Mod_rewrite writes subcat into number ?

mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Aug 11, 2008 - 3:12 PM:

Hello paul,

Strange thing here...
I noticed that some subcats are rewritten into numbers....

Real samples are:

mysite.com/Body-Art turned into ->mysite.com/10585
mysite.com/Kaarten en Panorama's turned into ->mysite.com/8937
mysite.com/Doe-het-zelf turned into ->mysite.com/690
mysite.com/Dag- en Nieuwsbladen tuned into ->mysite.com/490

Where does this comes from?
And how do i solve this?
Thank you..
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 11, 2008 - 5:09 PM:

If there are illegal characters it switches to numeric rewriting for that category. Apostrophes would be illegal. Literal hypens are illegal if you're using hypens as the standin for spaces.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Aug 11, 2008 - 7:00 PM:

So what would be the appropiate way to solve this?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 12, 2008 - 7:38 PM:

If you don't like the numeric rewriting, use characters that are legal in URLs. If you prefer to keep those characters, enjoy the numeric rewriting. If you really want both, I believe it'll work if you make the rewrite scheme {CATREWRITEPATH}-{CATID}/
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Aug 13, 2008 - 3:10 PM:

Ok paul...
I've changed : {CATREWRITEPATH}/{PAGE}.html to {CATREWRITEPATH}-{CATID}/
In the "Search Engine Optimization Settings" page..
But i still saw numbers in the categorie,and with this change 70% of my pages said...cannot be found....

So when i first had :mysite.com/computers/security
after the change you suggested that didnt worked anymore....
so how can that happen...



Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 13, 2008 - 9:48 PM:

Keep the page part, or simply go back to the original.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Aug 14, 2008 - 1:52 AM:

Sorry paul but its not clear what you mean by that.

In your first reply you wrote "If there are illegal characters it switches to numeric rewriting for that category. Apostrophes would be illegal. Literal hypens are illegal if you're using hypens as the standin for spaces."

But one of the categories is named "body-art" , is it because of the dash that it switches to numeric rewriting ?
But why isnt the use of a dash allowed?

Also another category named "Auto's" , and probably because of the "comma" it also switches to numeric rewriting.
And if i would attempt to solve it by changing "body-art" and "Auto's" to "body art" and "Autos" , would that solve it and would i be forced to regenerate the categories in order to see the changes?....?

Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
Posted Aug 14, 2008 - 5:29 PM:

If you use only characters in the category name which are legal in URLs and not already being used as your replacement for spaces then it will of course rewrite using the names. If you don't, it'll use numbers.

If you want to change what you replace spaces with to free up hyphens, use your SEO settings.

Regeneration would be necessary for subcategories if you have the subcategories on main page switch on.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
Posted Aug 14, 2008 - 5:51 PM:

mm, i understand but im no hero with this stuff paul,i tried 2 things but ended up with a page saying it doesnt exist,and after that all went down in a 500 internal error.
These are the ones on that show on my index subcats:


Kaarten en Panorama's
Body-Art
Dag- en Nieuwsbladen
Doe-het-zelf
Auto's
Boeken en Cd's

just 6,can you provide the correct lines of whatever i should change where please..?
Thank you.
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Aug 14, 2008 - 5:52 PM:

Kaarten en Panoramas
Body Art
Dag en Nieuwsbladen
Doe het zelf
Autos
Boeken en Cds
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
#11 - Quote - Permalink
Posted Aug 19, 2008 - 7:04 AM:

Thanks paul but i didnt received an email notification of your reply here sad

i wonder if you can help me in a different way...
is there a way to solve this in the seo section so it will rewrite differently ?
Cause regenerating will take up to 7 or 8 hours....and running on a server isnt something i like doing...as its 11.000 categories....
So if this can be solved by rewrite can you tell me what to put in there ?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
#12 - Quote - Permalink
Posted Aug 19, 2008 - 9:03 AM:

Hypens can rewrite if you make some other character, like underscores, not rewrite. Apostrophes can't be handled with rewriting rules. Anyway you'd still have to regenerate categories if you use subcats on main page and changed the category rewrite scheme in any way.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
#13 - Quote - Permalink
Posted Aug 19, 2008 - 7:15 PM:

Ok paul ,i edited the categories but at the end....(im not fully sure) it dropped dead by internal server error.
But it looks like the regenerating of the categories worked.

But let me ask you.
One cat in particular "Body-Art" still remains rewritten to a number..
When i looked in the database and searched for regular expression it found 5 of them in the wsnlinks_categories.
So if thats the only place shouldt i see "Body Art" after editing ?
And that a normal cat is rewritten ?
Paul
developer

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

Total Topics: 61
Total Comments: 7868
Paul
#14 - Quote - Permalink
Posted Aug 19, 2008 - 10:10 PM:

Body-Art is appropriate to be in the database as the cached URL for the title Body Art and should be left alone, which is exactly why the title Body-Art doesn't work.
mariow
Forum Regular

Usergroup: Customer
Joined: Jul 09, 2008

Total Topics: 22
Total Comments: 110
mariow
#15 - Quote - Permalink
Posted Aug 20, 2008 - 4:24 AM:

huh....but paul....but all still shows : mysite.com/94592 , and shouldnt that have been mysite.com/Body-Art by now ?
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.