Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Help with Mod Rewrite Rules

edited August 2006 in Vanilla 1.0 Help
http://www.eurolow.com/extensions/Attachments/image.php?CommentID=58&File=9.jpg&Type=Image Anyone able to help me out with some mod rewrite rules to make that link more user friendly??

Comments

  • What would you like the URL to look like when you're done?
  • edited July 2006
    Anything a bit nicer, perhaps http://www.eurolow.com/attachment/58/9.jpg if it comes out this will will it be able to be used in img tags on other forums too?
  • anyone?
  • edited July 2006
    Edit extensions/Attachments/default.php to make it create links the form you want, like attachment/Image/58/9.jpg.
    Then add to the rewrite rules something like that:
    RewriteRule ^attachment/([^/]+)/([0-9]+)/([^/]+)$ extensions/Attachments/image.php?CommentID=$2&File=$3&Type=$1 [QSA,L]
  • edited July 2006
    Which fonction create friendly urls in vanilla? How to Extend it?
  • The friendly urls extension :d
  • edited July 2006
    No, the friendly urls "extension" (it is just a .htaccess file, and a line in conf/setting.php) make apache transform each friendly url into a the basic url (to the php file with the appropriete query string). But what make vanilla display "categories/" instead of "categories.php" for example when $Configuration['URL_BUILDING_METHOD'] = 'mod_rewrite' ?

    Can we (easily) extend this fonction to use it in an extension?
  • But what make vanilla display "categories/" instead of "categories.php" for example…
    — Dinoboff
    The GetURL function on line 449 of in /library/framework/Framework.Functions.php
    Can we (easily) extend this fonction to use it in an extension?
    — Dinoboff
    Nope, I don't think we can.
  • You can in theory. You'd need to add the definitions and the right friendlyurls rules though. I think?
  • If the format was the same/similar, yes - just add a new
    $Configuration['REWRITE_...).

    But, I think the translation desired here won't work with it - it's too different?
This discussion has been closed.