How to deploy to live server? (urgent)
Hi. I have my local installation (using uWamp for development) But I want to deploy the site to the live server. I do not seem to be able to make it run outside of the bludit-2-3-4 sub directory.
I have copied all files to the root directory wwwroot and changed the reference in the .htaccess to rewritebase / and the line 19 in the site.php file under the bl-content/databases folder to end ain a trailing slash.
But it wont load. If i deploy the entire bludit-2-3-4 folder, and navigate directly to that then it works as expected. But when I go to the root via the normal domain url then it gives me a 403 error.
I have tried creating a .htaccess file under root to redirect to the sub folder, but that does not seem to do anything.
Any suggestions? I know I am missing something obvious. Any help would be greatly appreciated. Thank you.
I have copied all files to the root directory wwwroot and changed the reference in the .htaccess to rewritebase / and the line 19 in the site.php file under the bl-content/databases folder to end ain a trailing slash.
But it wont load. If i deploy the entire bludit-2-3-4 folder, and navigate directly to that then it works as expected. But when I go to the root via the normal domain url then it gives me a 403 error.
I have tried creating a .htaccess file under root to redirect to the sub folder, but that does not seem to do anything.
Any suggestions? I know I am missing something obvious. Any help would be greatly appreciated. Thank you.
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
It should work if you copy the content of the directory /bludit-2-3-4 to the root directory.
If the installation is in the root directory .htaccess should be as it is in the distribution package:
After the migration you can set the "Site URL" at "Settings" > "Advanced".
If this does not work you can PM me, and I will have a look at it.
If the installation is in the root directory .htaccess should be as it is in the distribution package:
Code: Select all
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
RewriteCond %{HTTPS} =off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
# Base directory
RewriteBase /
# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
If this does not work you can PM me, and I will have a look at it.
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
HI, Thank you for the response. I will have to leave it for this evening as it is work in the morning! But, I will try again over the next day or two. Interestingly, I noted that the .htaccess that came in my build is different to what you have posted above. My looks like this:
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /bludit-2-3-4/
# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
RewriteBase /bludit-2-3-4/
# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
- Edi
- Site Admin
- Posts: 3121
- Joined: Sun Aug 09, 2015 5:01 pm
- Location: Zurich
- Has thanked: 54 times
- Been thanked: 77 times
- Contact:
Sorry, the original distribution is:
The following is an addition and forces http requests to https:
Please try with the following:
instead of
Code: Select all
AddDefaultCharset UTF-8
<IfModule mod_rewrite.c>
# Enable rewrite rules
RewriteEngine on
# Base directory
#RewriteBase /
# Deny direct access to .txt files
RewriteRule ^bl-content/(.*)\.txt$ - [R=404,L]
# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</IfModule>
Code: Select all
RewriteCond %{HTTPS} =off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
Code: Select all
# Base directory
RewriteBase /
Code: Select all
# Base directory
RewriteBase /bludit-2-3-4/
Clickwork - Websites mit Bludit | Planet Bludit - Tipps und Snippets
So I tried as described. Copied all files to root, set the base to just a forwards slash, and the index page loads. But when I click on a tag or category link it says 404 not found.
I am on shared hosting, with a redirect from my domain name to my wwwroot folder. But this has worked before and still redirects correctly otherwise index.php wouldn’t get found, right?
I did try a quick install directly on the server, but got folder not writable errors, so I had to stop there for the day and roll back.
I work long night shifts so only get to try quick tasks before work each day! Has anyone else managed to copy a dev folder to live without issue? I’m sure it’s just a config issue, but I only get small windows to play
Thanks for any help.
I am on shared hosting, with a redirect from my domain name to my wwwroot folder. But this has worked before and still redirects correctly otherwise index.php wouldn’t get found, right?
I did try a quick install directly on the server, but got folder not writable errors, so I had to stop there for the day and roll back.
I work long night shifts so only get to try quick tasks before work each day! Has anyone else managed to copy a dev folder to live without issue? I’m sure it’s just a config issue, but I only get small windows to play
Thanks for any help.