• Resolved hopefulness

    (@hopefulness)


    Hello
    I had a Share Hosting and two Domains on it. I bought a VPS service and transferred my Domains and Files from my previous service to new service. although changing DNS, Domains (URLs) didn’t change.

    I installed MariaDB on VPS. When I want to import my Databases, I see this error:

    SQL query:
    CREATE TABLE <code>MPS_commentmeta</code> (
      <code>meta_id</code> bigint(20) unsigned NOT NULL AUTO_INCREMENT,
      <code>comment_id</code> bigint(20) unsigned NOT NULL DEFAULT '0',
      <code>meta_key</code> varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,
      <code>meta_value</code> longtext COLLATE utf8mb4_unicode_520_ci,
      PRIMARY KEY (<code>meta_id</code>),
      KEY <code>comment_id</code> (<code>comment_id</code>),
      KEY <code>meta_key</code> (<code>meta_key</code>(191))
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
    
    MySQL said: 
    #1273 - Unknown collation: 'utf8mb4_unicode_520_ci' 
    

    I replaced CHARSET from utf8mb4 to utf8
    and COLLATE from utf8mb4_unicode_520_ci to utf8_general_ci

    Than, I could import previous database to phpMyAdmin.

    Now one of my site works well. The other one has a problem.
    the site loads the home page but does not find any pages.

    Not Found
    The requested URL ... was not found on this server.

    I can open the dashboard (wp-admin).
    I have also checked the permalinks.
    The .htaccess is OK.

    AS I said, I have two domain on one host and one database.
    one of them has this problem!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    On the site that gets the 404s, what happens if you disable the permalinks (i.e., choose “plain”). If that works, then the issue is in your apache configs. Add these 3 lines to the virtual host config file for that site:

    <Directory /path/to/wordpress/documentroot>
      AllowOverride All
    </Directory>

    and restart apache. (Be sure to put in the correct path and don’t just paste the above.)

    Thread Starter hopefulness

    (@hopefulness)

    Thanks. Those lines was on virtual host config file.
    I think there is something else wrong in my Apache configs.
    I disable the permalinks and it works.

    The subdomain I need help with:
    https://blog.aliomidvar.photography

    • This reply was modified 6 years, 8 months ago by hopefulness.
    • This reply was modified 6 years, 8 months ago by hopefulness.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Make sure you have an .htaccess file if you want to use anything other than plain permalinks.

    Thread Starter hopefulness

    (@hopefulness)

    .htaccess file :

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    Is it correct

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    That looks correct. The issue is in your apache configs. Double check the <Directory> block.

    Thread Starter hopefulness

    (@hopefulness)

    I have problem with my subdomain.
    I changed .htaccess of my both site

    .htaccess of Subfolder:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    .htaccess of SubDomain:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    The problem remained unresolved

    Thread Starter hopefulness

    (@hopefulness)

    I changed site URL from blog.aliomidvar.photography to aliomidvar.photography/blog/

    then I changed .htaccess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /blog/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /blog/index.php [L]
    </IfModule>
    
    # END WordPress

    It resolve the problem

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘The request was not found on this server!’ is closed to new replies.