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.
Rewrite URL problem in fresh installation
kate1138
New
Apologies I saw similar question asked a few times here. But I still can't figure out.
After unzip the installation files, updating RewriteBase line in .htaccess file, and chown to apache user -
I am able to access the initial installer page at
http://mydomain/forum/index.php?p=/dashboard/setup
but not
http://mydomain/forum/dashboard/setup
I can't proceed the installation using the parameter URL. What should I do to fix the substitute URL?
My .htaccess file:
# Modified # If you modify this file then change the above line to: # Modified <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 /forum RewriteCond %{QUERY_STRING} ^p=/?([^&]+)(&([^?]+))?$ RewriteRule ^index\.php %1?%3 [E=X_REWRITE:1,L] # The basic rewrite rule. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [QSA,E=X_REWRITE:1,E=X_PATH_INFO:/$1,L] # Add the proper X_REWRITE server variable for rewritten requests. RewriteCond %{ENV:REDIRECT_X_REWRITE} .+ RewriteCond %{ENV:REDIRECT_X_PATH_INFO} (.+) RewriteRule ^index\.php - [QSA,E=X_REWRITE:1,E=!REDIRECT_X_REWRITE,E=X_PATH_INFO:%1,E=!REDIRECT_X_PATH_INFO,L] # 301 redirect urls that start with index.php #RewriteCond %{REQUEST_METHOD} GET [NC] #RewriteCond %{REQUEST_URI} ^(.*?)/index\.php(.*)$ #RewriteRule ^index\.php /%1%2 [QSA,R,L] </IfModule>
0
Answers
Please read this discussion and replace the htaccess ....report back if it worked.
https://open.vanillaforums.com/discussion/33677/installing-vanilla-2-3-1on-subdomain-on-shared-apache-hosting#latest
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Thank you for the quick response.
No it doesn't work. I tried replacing the entire .htaccess file with the below from the other post, it doesn't work. I tried using the below text but change RewriteBase to /forum, still same 404 error.
Contrary to what I imagined,
http://mydomain/forum/index.php?p=/dashboard/setup
works both underRewriteBase /
andRewriteBase /forum
.You also need to add a configuration to allow rewrite URL . Add the line bellow to the config.php both of these need to exist in order for rewrite to work.
$Configuration['Garden']['RewriteUrls'] = true;
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Hi - I do not have a config.php under conf folder. It is something you have after you have run installer? I tried to add the line to config-defaults.php, but I still get the same error.
The config gets generated after set up you need to go through set up to generate the config
Your site.com/setup
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
Since I can't get through the installer, what would you suggest I do to fix?
I'm still in the same situation:
http://mysite/forum/index.php?p=/dashboard/setup
shows the installer but throws 404 after I submit the form.http://mysite/forum/dashboard/setup
throws 404.Tried replacing .htaccess with the referred post, tried to enable rewriteURL in config-defaults.php, all the tweaks yield same result.
There is no error log in php error log. Is there anything else I should look or provide?
What php version are you running and or is the rewrite Module enabled ?
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
It's PHP 7. And I think rewrite is enabled:
You would at least be able to install Vanilla if you add
$Configuration['Garden']['RewriteUrls'] = false;
to your /conf/config-defaults.phpObviously you wouldn't be able to use pretty urls from the start and you should trying to solve that issue, but it would get you started and make your first experiences with Vanilla.
After the installation, you should delete that line from config-defaults.php and move it over to config.php where you set it to
true
.With the short .htaccess that vrijvlinder has linked to (changed so that is reads
RewriteBase /forum
) you should be able to use Vanilla with pretty urls.At least that is what we all hope...