That means your site dies when you have two links with the same title. You don't want that. It's very easy two sites to be titled the same.
http://www.yourdomain.com/links/654.html
If you want to remove the keywords from your URL to defeat the whole point of mod_rewrite, admin panel->settings->search and SEO offers you this option. Type in the new format you want there and edit your .htaccess to reflect your change.
Not that I have any idea why you'd want to do that, but you can change the rewritepath function of classes/categories.php to tack on $path .= '/'; before the last line if you want to break compatibility for it.
Not that I have any idea why you'd want to do that, but you can change the rewritepath function of classes/categories.php to tack on $path .= '/'; before the last line if you want to break compatibility for it.
Trailling Slash works fine, thank you. But for Pagination, we have now following style:
a.) yes i saw it now, my stupid question. I am sorry.
b.) Yes, I have some special characters (e.g. "&"). May I remove it all or can i add somewhere similiar like this: $title= preg_replace("/[^a-zA-Z0-9]/","",$title); ?
If there's an & in the name it will end up using numeric rewriting -- & isn't legal in URLs. Removing the & in the code would simply make the category dead since it would be trying to find a category named "x y" when the actual category is named "x & y".
0/5
1
2
3
4
5
This thread is closed, so you cannot post a reply.
Comments on Mod Rewrite
Beginner
Usergroup: Customer
Joined: Jan 28, 2004
Total Topics: 2
Total Comments: 5
Hi Paul!
I tried to use the mod-rewrite option. At first, each link looks similar to:
http://www.yourdomain.com/36 (for categories)
http://www.yourdomain.com/links/654 (for outgoing links)
http://www.yourdomain.com/detail/link-name-35.html (for detail page)
1.
Ok, I like to use following style for outgoing links:
http://www.yourdomain.com/links/654.html
or much better (but not tested)
http://www.yourdomain.com/links/linktitle.html
I changed the .htaccess:
Now, I have to change the modrewrite.php, right?
Wich line I have to change? I tried to change line 58 & 66 from:
to
But nothing happens.
2.
Last but not least, I like to use following style for catlinks:
http://www.yourdomain.com/catname/ (with trailing back-slash)
and for subcategories:
http://www.yourdomain.com/catname/subcatname/ (with trailing back-slash)
So far, what I have to do?
BG
Jan
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
or much better (but not tested)
http://www.yourdomain.com/links/linktitle.html[/i]
That means your site dies when you have two links with the same title. You don't want that. It's very easy two sites to be titled the same.
http://www.yourdomain.com/links/654.html
If you want to remove the keywords from your URL to defeat the whole point of mod_rewrite, admin panel->settings->search and SEO offers you this option. Type in the new format you want there and edit your .htaccess to reflect your change.
http://www.yourdomain.com/catname/ (with trailing back-slash)
Not that I have any idea why you'd want to do that, but you can change the rewritepath function of classes/categories.php to tack on $path .= '/'; before the last line if you want to break compatibility for it.
Beginner
Usergroup: Customer
Joined: Jan 28, 2004
Total Topics: 2
Total Comments: 5
a.)
That means your site dies when you have two links with the same title. You don't want that. It's very easy two sites to be titled the same.
http://www.yourdomain.com/links/654.html
Oh, that's right. Due to I like to have the title in my links, so we can have also the ID inside for unique links, e.g.:
http://www.yourdomain.com/links/linktitle-654.html
b.)
Trailling Slash works fine, thank you.
But for Pagination, we have now following style:
http://www.yourdomain.com/catname//2/
same by eg.g Admin Edit:
http://www.yourdomain.com/catname//edit.php?action=link&field=id&condition=equals&fieldvalue=695
Also, if I set "Use category names in URL: YES" nothing happens, WSN produce only the CATID.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
a) That being a default option.
b) Then I guess the trailing slash isn't an option, if it causes problems, though I don't see why it would.
Also, if I set "Use category names in URL: YES" nothing happens, WSN produce only the CATID.
Are there special characters in the name?
Beginner
Usergroup: Customer
Joined: Jan 28, 2004
Total Topics: 2
Total Comments: 5
a.) yes i saw it now, my stupid question. I am sorry.
b.) Yes, I have some special characters (e.g. "&").
May I remove it all or can i add somewhere similiar like this: $title= preg_replace("/[^a-zA-Z0-9]/","",$title); ?
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
If there's an & in the name it will end up using numeric rewriting -- & isn't legal in URLs. Removing the & in the code would simply make the category dead since it would be trying to find a category named "x y" when the actual category is named "x & y".