Friend URL help

edited February 2008 in Vanilla 1.0 Help
Been trying to modify it unsuccessfully, only had a quick run through of it however.

Basically I want to have categories listed as .com/whatever/ - .com/bugs/ etc

However upon editing and removing "discussion" etc for the categories, I'm still left with this as a URL when uploaded. Any help?

#Discussions
RewriteRule ^$ index.php [QSA,L]
RewriteRule ^/$ index.php [QSA,L]
RewriteRule ^/([0-9]+)$ index.php?page=$1 [QSA,L]
RewriteRule ^/([0-9]+)/$ index.php?page=$1 [QSA,L]
RewriteRule ^([0-9]+)$ index.php?CategoryID=$1 [QSA,L]
RewriteRule ^([0-9]+)/$ index.php?CategoryID=$1 [QSA,L]
RewriteRule ^([0-9]+)/([0-9]+)$ index.php?CategoryID=$1&page=$2 [QSA,L]
RewriteRule ^([0-9]+)/([0-9]+)/$ index.php?CategoryID=$1&page=$2 [QSA,L]

#Categories
RewriteRule ^/$ categories.php [QSA,L]

Is how it currently stands, any help?

Comments

  • Anyone?
  • What exactly do you mean? Isnt that how it already works?
  • The first two lines are redundant because .com/ will always go to index.php or index.html.
  • As I said, I've only quickly ran through and modified the code. Haven't paid much attention.

    At the moment, installing a default friendly urls plugin you'll have the default set up .com/category/1/ and so on. I want to be able to just have .com/1/ etc, but also change 1 to the category name instead of ID if possibly...
  • Well at the moment it's setup so .com/1 will go to page 1 of discussions. There's no way to work with the category name other than by writing an extension.
This discussion has been closed.