Page 1 of 1

How to deploy to live server? (urgent)

Posted: Sun Aug 12, 2018 9:44 pm
by RobinSlee
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.

Re: How to deploy to live server? (urgent)

Posted: Mon Aug 13, 2018 12:16 am
by Edi
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:

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>
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.

Re: How to deploy to live server? (urgent)

Posted: Mon Aug 13, 2018 12:59 am
by RobinSlee
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>

Re: How to deploy to live server? (urgent)

Posted: Mon Aug 13, 2018 1:16 am
by Edi
Sorry, the original distribution is:

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>
The following is an addition and forces http requests to https:

Code: Select all

RewriteCond %{HTTPS} =off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [QSA,L,R=301]
Please try with the following:

Code: Select all

# Base directory
RewriteBase /
instead of

Code: Select all

# Base directory
RewriteBase /bludit-2-3-4/

Re: How to deploy to live server? (urgent)

Posted: Tue Aug 14, 2018 11:22 pm
by RobinSlee
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.

Re: How to deploy to live server? (urgent)

Posted: Wed Aug 15, 2018 1:01 am
by Edi
You can PM me.