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.

Problem with Friendly URL and Multiviews

edited June 2006 in Vanilla 1.0 Help
I add this strange problem with the Friendly Urls 1 extension. The rules for the account of the forum wasn't working; all the request to account/#/ resulted in displaying account.php.

I finaly get it working with Multiviews disable:

Options +FollowSymLinks -Multiviews


  • MarkMark Vanilla Staff
    Thanks for the tip!!
  • edited June 2006
    Would be nice to know if it is a normal behaviour or if it is a bug on my server. Can someone could try the rules with :
    Options +FollowSymLinks +MultiviewsAnd tell me if he has the same problem to visit pages of others accounts?
  • I installed friendly urls and everything seems to work ok. The links for each post on the main page point to friendly urls, but the urls they point to do not exist (i.e. when clicked they go to nowhere). Am I missing something?
  • Did you add .htaccess to the root of the forum? Do you have mod_rewrite enable on your server?
  • I'm having problems with this.... the instructions say "Copy the .htaccess file in this add-on to the root folder of your Vanilla installation."

    But there's only one file, the readme, in the FriendlyUrls folder. Is there stuff in .htaccess or is it just a blank file?
  • .htaccess is the file that tells Apache (via mod_rewrite) to do its URL rewriting magic. I would say it has very important stuff in it.
  • edited June 2006
    By default on linux, the files with a dot at the start of the name are hiden. with a shell access you can see that hiden files with ls -a.

    If you use a ftp program, There might be an option to see that hidden files
  • edited June 2006
    In your apache's http.conf file, you should set directory permission to override all. Else the .htaccess file won't work:
    <Directory /home/jazzman/HTML/> AllowOverride All </Directory>
    Restart apache service after you've changed it :)
  • edited June 2006
    If .htaccess is in the root folder of vanilla and it is still doesn't work, the setting of your server doesn't let you change the setting with .htaccess. If you have access to the httpd.conf check for the AllowOverride directives. Or better, if you can edit httpd.conf, add the rules in a Directory directive:

    #Check mod_rewrite is on. #For apache 2.x, if you don't see this line, add it (or uncomment it). #For apache 1.3, check your manual. ... LoadModule rewrite_module modules/ ... <Directory /Path/to/forum/htdocs> Order allow,deny allow from all RewriteEngine On Options +FollowSymLinks #Discussions RewriteRule ^discussions/$ index.php [QSA,L] RewriteRule ^discussions/([0-9]+)/$ index.php?page=$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] #Comments RewriteRule ^discussion/([0-9]+)/([0-9]+)/(.*)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/(.*)/$ comments.php?DiscussionID=$1 [QSA,L] RewriteRule ^discussion/([0-9]+)/([0-9]+)/$ comments.php?DiscussionID=$1&page=$2 [QSA,L] RewriteRule ^discussion/([0-9]+)/$ comments.php?DiscussionID=$1 [QSA,L] #Categories RewriteRule ^categories/$ categories.php [QSA,L] #Account RewriteRule ^account/$ account.php [QSA,L] RewriteRule ^account/([0-9]+)/$ account.php?u=$1 [QSA,L] #Search RewriteRule ^search/$ search.php [QSA,L] RewriteRule ^search/([0-9]+)/$ search.php?page=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/$ search.php?SearchID=$1 [QSA,L] RewriteRule ^search/saved/([0-9]+)/([0-9]+)/$ search.php?SearchID=$1&page=$2 [QSA,L] #Post RewriteRule ^post/$ post.php [QSA,L] RewriteRule ^post/([0-9]+)/$ post.php?CommentID=$1 [QSA,L] RewriteRule ^post/category/([0-9]+)/$ post.php?CategoryID=$1 [QSA,L] #Settings RewriteRule ^settings/$ settings.php [QSA,L] #People RewriteRule ^people/$ people.php [QSA,L] <Directory>

    Restart apache.
  • Ok got it working now. Don't know why I couldn't see the file to start with... :)
  • ToivoToivo New
    edited June 2006
    probably a stupid question. [oh, it was ...]
  • This option is necessary for mod_rewrite to work.
  • What if you can't edit httpd.conf?
  • Try the .htaccess. If it doesn't work, ask your provider to enable AllowOverride and FollowSymLinks for your virtual domain.
  • ToivoToivo New
    edited June 2006
    could one substitute "Options +FollowSymLinks" with something else ... .. like "Options +SymLinksIfOwnerMatch"? FollowSymLinks not allowed by virt host provider
  • yep it is good.

    You provider won't allow any use of Options, But he can set the Options you want for your virtual domain.
    He might not set FollowSymLinks, But he shouldn't see any problem with SymLinksIfOwnerMatch.
This discussion has been closed.