Error 404 after updating

Post Reply
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Tue Feb 11, 2020 7:41 pm

Hello,

I am working on Bludit in the Persian language, I did the work.
So when I want to update Bludit by overwriting blog goes wrong and shows error 404, I test it with the Official version, I get the same error!
the only page works fine is the main page
I test both versions on the localhost, they work perfectly.

I test on PHP 5.2 and 7.3 on the live server. :?

Code: Select all

File does not exist: /home/bluditir/domains/bludit.ir/private_html/wp-login.php, referer: http://bludit.ir/wp-login.php
the wp-login.php is so weird!

Regards,
User avatar
Edi
Site Admin
Posts: 1843
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Wed Feb 12, 2020 11:36 pm

https://bludit.ir/blog/ works for me. Or is the problem with another installation?

wp-login.php is very weird. It seems to be an artefact from an earlier WordPress installation. What is in the file .htaccess?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Thu Feb 13, 2020 12:07 pm

Hello Edi,

Right now I restored to Bludit 3.10, I guess I break something when I modified some files in the back-end.
I have to double-check all the modified files.
P.S: I didn't install WordPress, error logs record weird messages!.
anyway, the htaccess file contains the following lines:

Code: Select all

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

# Enable rewrite rules
RewriteEngine on

# Base directory
# RewriteBase /

# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]

</IfModule>
Regards,
User avatar
Edi
Site Admin
Posts: 1843
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Thu Feb 13, 2020 12:17 pm

Does it now work or not yet?
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Thu Feb 13, 2020 12:25 pm

No, it has problem, but only on live site, I tested on localhost it works perfectly, would you like to test it if you have enough time?
Tomorrow I have free time I can test all files I modified, I didn't have this problem before.
User avatar
Edi
Site Admin
Posts: 1843
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Thu Feb 13, 2020 1:00 pm

Yes, I can test it tomorrow.
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Thu Feb 13, 2020 2:54 pm

Edi wrote:
Thu Feb 13, 2020 1:00 pm
Yes, I can test it tomorrow.
Please check out your PM box
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Thu Feb 13, 2020 9:25 pm

After hundreds of times of testing and comparing one by one of the files, I found out the problem.

There was a command line in the htaccess file
RewriteBase /
I should comment it :|
User avatar
Edi
Site Admin
Posts: 1843
Joined: Sun Aug 09, 2015 5:01 pm
Location: Zurich
Contact:

Thu Feb 13, 2020 11:11 pm

What do you mean with command line? A command, an expression?

Anyway, I'm glad it works now. :)
Planet Bludit, Tipps, Snippets und nützliche Links. - Newsletter, Informationen zu Bludit (auf Deutsch).
User avatar
abdulhalim
Master Bludit
Posts: 104
Joined: Thu Mar 10, 2016 6:25 pm

Fri Feb 14, 2020 10:13 am

Thank you Edi, At least I can understand programmers now :lol:

the htaccess file in the localhost was just like this

Code: Select all

AddDefaultCharset UTF-8

<IfModule mod_rewrite.c>

# Enable rewrite rules
RewriteEngine on

# Base directory
RewriteBase /

# Deny direct access to the next directories
RewriteRule ^bl-content/(databases|workspaces|pages|tmp)/.*$ - [R=404,L]

# All URL process by index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [PT,L]

</IfModule>
I had to comment Base directory

Code: Select all

# Base directory
# RewriteBase /
Just like this, now it works perfectly
Post Reply