Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

.htaccess problem

edited March 2010 in Vanilla 2.0 - 2.8
I succesfully installed Vanilla at http://marathonnews.net/forums/ . However, for some reasons, "nice urls" don't seem to work, even though I uploaded the .htaccess-file to the forums directory. In the General Settings, I get this message under "Use Garden's .htaccess file to rewrite urls": "The server configuration for this setting could not be found. If you enable this setting your site may become unavailable."

Can somebody explain what the reason for this might be? It works fine on my local test machine. Also, the WP installation at http://marathonnews.net/ makes use of mod_rewrite without any problems.

Would really appreciate it if I could get rid of the "index.php/" part in the forum urls!!

Comments

  • same problem here!
    my webhost (strato) says to support rewriteengine...
  • I'm having a similar problem and I think .htaccess settings are the root cause. My original thread is here: http://vanillaforums.org/discussion/10752/invite-and-base-url-404s/#Item_3

    I'm seeing a common theme with this WordPress/Vanilla interaction.

    Any ideas on a fix?
  • I made it work by using this .htaccess on my Strato-webspace:

    DirectoryIndex index.php/


    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*) index.php/$1 [L,R=301]


    Now I can set the option for the .htaccess-settings and everything works.
    But I don't have clean URLs, the .htaccess puts the index.php in every URL.
  • As I said I now CAN enable the URL-rewriting but then I CAN'T login anymore!
    So I left this option disabled again...
  • Everything works so far, except that when I try to use short urls, they only work this way:
    xxxxxx.com/?p=/discussions/mine
    If I leave the "?p=", they don't work anymore.
    I'm using the .htaccess of the newest commit:


    Options -Indexes

    AddType application/x-httpd-php5 .php .php3 .php4 .php5
    DirectoryIndex index.php/



    Options +FollowSymLinks
    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is going to be in a subfolder change this to /foldername
    RewriteBase /forum/
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L]

  • ToddTodd Vanilla Staff
    Some hosts need the RewriteBase and some won't work if RewriteBase is on. That's why we put the comment in there.

    The addition of the ?p= was made in RC3. We don't plan on changing it again, so thanks for bearing with us here.
  • TiGRTiGR
    edited July 2010
    @basb, you have an error in last line:

    RewriteRule ^(.*) index.php/$1 [L,R=301]

    It should read:

    RewriteRule ^(.*) index.php?p=$1 [QSA,L]

    That's why you can't login.
  • SS ✭✭
    Confirm the problem.
    Added Options +FollowSymLinks
  • ToddTodd Vanilla Staff
    Anyone that has an .htaccess problem that they fix by changing the .htaccess file could you please:
    1. Give us the name of your web host or server info if you are localhost/custom.
    2. Give us a complete listing of the .htaccess file that work.

      1. Thanks to all that have done this already.
  • edited July 2010
    @TiGR I already corrected that problem (post from 07-23, 8:31AM) but it didn't help.
    I changed the RewriteBase and now it works (don't know why I put the "forum/" in there):

    Options -Indexes

    AddType application/x-httpd-php5 .php .php3 .php4 .php5
    DirectoryIndex index.php/



    Options +FollowSymLinks
    RewriteEngine On
    # Certain hosts may require the following line.
    # If vanilla is going to be in a subfolder change this to /foldername
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?p=$1 [QSA,L]

    RewriteCond %{SERVER_PORT} !443
    RewriteCond %{HTTP_HOST} ^forum\.xxxxxx\.de$
    RewriteRule ^(.*) https://www.ssl-id.de/forum.xxxxxx.de/$1 [R=301,L]


Sign In or Register to comment.