HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

how to setup root folder to serve vanilla folder with .htaccess and hide vanilla folder in URL ?

raykairaykai New
edited June 2016 in General Banter

so im trying to serve vanilla from a sub-folder root(home) >forumfolder(subfolder) and hide forumfolder name from the URL using .htaccess

im trying to do as with wordpress:

"Many people want WordPress to power their site's root (e.g. http://example.com) but they don't want all of the WordPress files cluttering up their root directory. WordPress allows you to install it into a subdirectory, but have your blog exist in the site root."
http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

i did try to put this in .htaccess for the webroot (keep the .htaccess in the forum folder intact)

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase / 
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . - [L]
    RewriteRule ^(.*)$ /forumfolder $1 [QSA,L]
</IfModule>

Changing forumfolder to the folder name. there is no index.php or index.html, etc at all in the web root.

i did add these values to /forumfolder/conf/config.php

$Configuration['Garden']['WebRoot'] = '/forumfolder';
$Configuration['Garden']['StripWebRoot'] = 'TRUE';

In /forumfolder/.htaccess i did change it to

<IfModule mod_rewrite.c> RewriteEngine On # Certain hosts may require the following line. # If vanilla is in a subfolder then you need to specify it after the /. # (ex. You put Vanilla in /forum so change the next line to: RewriteBase /forum) RewriteBase /forumfolder RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ index.php\?p=$1 [QSA,L] </IfModule>

i clear all the *.ini files in /forumfolder/cache

its working for the home page of the vanilla but if i click on a Discussions it gives a Not Found error.

Comments

Sign In or Register to comment.