Magento 2.3 – Magmi-2 setup 404 error in LEMP

Afer download (Branch 2) Magmi and paste into usr/shar/nginx/html/magento23/magmi then run url,

Error : 404 error: Page not found.

Return 404 after configure the https on Apache 2.4

I am trying to deploy a new Angular app with apache 2.4 + ubuntu 16. Angular app is the frontend app, it would call the api from backend servers.
I can visit the home page, but failed with error “The requested URL was not found on this server.” when I try to visit the next page.

Here is my configurations for apache.

<VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        DocumentRoot /var/www/

        RewriteEngine on
        RewriteCond %{SERVER_PORT} !^443$
        RewriteCond %{REQUEST_URI} !^/api
        RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} (L,R=301)
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn

        ErrorLog ${APACHE_LOG_DIR}/apache2_error.log
        CustomLog ${APACHE_LOG_DIR}/apache2_access.log combined

        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf

<VirtualHost *:443>
        DocumentRoot /var/www/
        SSLEngine on
        SSLCertificateFile /opt/clsfd_ib/env/ssl_keys/
        SSLCertificateKeyFile /opt/clsfd_ib/env/ssl_keys/
        #SSLCertificateChainFile /opt/clsfd_ib/env/ssl_keys/
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combinedi

        ProxyPass /api
        ProxyPassReverse /api
        <Location "/api">
                Require all granted

Feel free to let me know if you need more infomation.
Thank you a lot.

buddypress – bp_core_new_subnav_item shows new group tab but returns 404 when the tab runs. Works on another page

I’m trying to add a tab and form to a BuddyPress/BuddyBoss group. I’m able to add the tab, but the page just doesn’t display. I get a 404, and the page logic is never run.

What’s strange is this code works for another tab.

I’ve tried turning the access to True. I’ve tried a variety of settings for the path. I’m running out of ideas.

add_action('bp_init', 'setup_group_edit_nav');
function setup_group_edit_nav() {
    global $bp;

    if(bp_is_active('groups') && !empty($bp->groups->current_group)) {
        $group_type = bp_groups_get_group_type($bp->groups->current_group->id);

        //Make changes only to the group.
        if(cannxi_is_comp($group_type)) {
            //add the Edit Company to the manage tab.
            //$group_link = group_base_slug($bp) .  '/admin/';
            $user_access = $bp->groups->current_group->user_has_access && can_change_comp_settings();

            $current_group = groups_get_current_group();
            $admin_link = trailingslashit(bp_get_group_permalink($current_group).'admin');
            error_log(print_r($user_access, TRUE));
            //$user_access = $bp->groups->current_group->user_has_access;
                    'name'            => __('Company Details', 'cannxi'),
                    'slug'            => 'group-company-edit',
                    'default_subnav_slug' => 'group-company-edit',
                    'parent_url'      => $admin_link,
                    'parent_slug'     => $bp->groups->current_group->slug . '_manage',
                    'screen_function' => 'cannxi_group_show_manage_comp_details_tab',
                    'position'        => 1,
                    'user_has_access' => $user_access,

function cannxi_group_manage_comp_title() {
    echo 'Company Details';

 * Load the Jobs tab template for the Groups.
function cannxi_group_manage_comp_content() {
    echo "test";
    //bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'groups/groups-manage-companies-details' ) );

    $attached_post_id = groups_get_groupmeta(bp_get_current_group_id(), 'group_post_id');
//$attached_post_type  = groups_get_groupmeta( bp_get_current_group_id(), 'group_type' );
//$attached_form_slug  = get_post_meta( $attached_post_id, '_bf_form_slug', true );
//$group_permalink  = bp_get_group_permalink( groups_get_current_group() ) . bp_current_action();
    <div id="bf_aptg2" class="bf_main_aptg">
        $args = array(
            'post_type' => 'company_listings',
            'post_id'   => $attached_post_id,
            'form_slug' => 'company_website',

        echo buddyforms_create_edit_form($args);

function can_change_comp_settings() {

    $buddyforms_aptg = groups_get_groupmeta(bp_get_current_group_id(), 'buddyforms-aptg');
    if(isset($buddyforms_aptg('can-create'))) {
        switch($buddyforms_aptg('can-create')) {
            case 'admin' :
                if(groups_is_user_admin(bp_loggedin_user_id(), bp_get_current_group_id())) {
                    return TRUE;
            case 'mod' :
                    groups_is_user_mod(bp_loggedin_user_id(), bp_get_current_group_id()) ||
                    groups_is_user_admin(bp_loggedin_user_id(), bp_get_current_group_id())) {
                    return TRUE;
            case 'member' :
            default :
                if(groups_is_user_member(bp_loggedin_user_id(), bp_get_current_group_id())) {
                    return TRUE;
    return FALSE;

reactjs – React Github pages says published but I keep getting a 404

I’m trying to follow the steps on this link to deploy a React app to Github pages. I’ve followed the steps exactly and my package.json looks like this:

    "homepage": "",
    "name": "web",
    "version": "0.1.0",
    "private": true,
    "dependencies": {
        "@testing-library/jest-dom": "^4.2.4",
        "@testing-library/react": "^9.5.0",
        "@testing-library/user-event": "^7.2.1",
        "react": "^16.13.1",
        "react-dom": "^16.13.1",
        "react-scripts": "3.4.1",
        "react-spring": "^8.0.27"
    "scripts": {
        "predeploy": "npm run build",
        "deploy": "gh-pages -d build",
        "start": "react-scripts start",
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
    "eslintConfig": {
        "extends": "react-app"
    "browserslist": {
        "production": (
            "not dead",
            "not op_mini all"
        "development": (
            "last 1 chrome version",
            "last 1 firefox version",
            "last 1 safari version"
    "devDependencies": {
        "gh-pages": "^3.1.0"

and I deploy the app with npm run deploy. This correctly creates a branch gh-pages.

My repo has the correct settings (Settings says Your site is ready to be published at and the sources underneath says Your GitHub Pages site is currently being built from the gh-pages branch.) So I assume I’ve done everything correctly but I’m still getting a 404 for my page (

Is there anything I could be doing incorrectly here?


c# – Should you validate route parameters or let them fail with a 404?

So this is an example endpoint to fetch one user by its username

public async Task<ActionResult<object>> GetUser((FromRoute) string username)
    // ...

Regardless of the value of username the database will either find and return a user or null. But you know that a username has validation constraints like

  • max length of x
  • no special characters

So you could also add a validation route constraint e.g.


but then you have to do it for every endpoint. The advantage is that bad parameter values will never touch the database so you might increase the performance because the request gets denied. The bad thing is that you will have to maintain all these endpoints with extra validations instead of saying “I don’t care for the value, the database will find it or not.”.

Are there any best practises which approach should be considered?

search engine indexing – Does Google Actually Deindex 410 pages faster than 404?

Yes, 410 pages do deindex a bit faster than 404 pages, once Google sees them.

According to Mueller from Google:

The subtle difference here is that a 410 will sometimes fall out a little bit faster than a 404. But usually, we’re talking on the order of a couple days or so.

That being said, Google needs to crawl them before they will be able to find the 404/410. If Google isn’t crawling as fast as you’d like, submit your URLs to the Search Console Removal Tool.

redirection – 404 error with Drupal 7 in Ubuntu server

I’ve installed a web server LAMP in Ubuntu, the usual, in /var/www/html.

And I want to test two Drupal versions, so in /html I have created two folders:

I have installed Drupal 8 on /drupal8 and it works fine.

I have imported an existing site in /drupal7 and it doesn’t even start Drupal, I get error 404 page not found.

I have checked the settings.php of drupal7 and I can’t find any error, the $base_url to localhost/drupal7 and no more.

What more should I check to find why it returns 404 errors?

Responding ‘404’ for subdirectories is bad practice?

I had URLs like this:

For SEO reasons I decided to add some text:

But I noticed that the alphanumeric ID looks weird in front, and this order is more user friendly:

But now if I go to the parent directory (for whatever reason, search engine spider indexing the site, etc) the page just does not exist 404 (I could send a 200 response, but that would not be correct, I have no content for that page).
Is this ok?

permalinks – Extending page urls without getting a 404

I’m using a shortcode on some of my pages and need to add a gender to the page urls.

For example, if the page slug is “/ninjas/”, I need to be able to use urls like “/ninjas/female/” and “/ninjas/male/” for the page.

Default behavior is that I get a 404, but I would just like to get the page as normal.

Is that possible somehow?


urls – custom endpoints on Custom Post Type return 404 page not found

I am trying to add custom end point url to custom post type posts. After much searching I have added the add_rewrite_endpoints to functions.php

    function psf_game_endpoints() {
    add_rewrite_endpoint( 'related-articles', EP_PERMALINK );
    add_rewrite_endpoint( 'review', EP_PERMALINK );
    add_rewrite_endpoint( 'screenshots', EP_PERMALINK );
add_action( 'init', 'psf_game_endpoints' );

I have also added a filter for query vars (don;t really know what that means but found the code on here)
This code is also in functions.php

add_filter( 'request', 'wpse42279_filter_request' );
function wpse42279_filter_request( $vars )
    if( isset( $vars('related-articles') ) ) $vars('related-articles') = true;
    if( isset( $vars('review') ) ) $vars('review') = true;
    if( isset( $vars('screenshots') ) ) $vars('screenshots') = true;
    return $vars;

And I have also added a function to functions.php to load the templates I have made for each endpoint, this is also in functions.php

    function wpd_game_template( $template = '' ) {
    global $wp_query;
    if( ! array_key_exists( 'review', $wp_query->query_vars ) ) return $template;

    $template = locate_template( 'single-game-review.php' );
    if( ! array_key_exists( 'related-articles', $wp_query->query_vars ) ) return $template;

    $template = locate_template( 'single-game-related.php' );
    if( ! array_key_exists( 'screenshots', $wp_query->query_vars ) ) return $template;

    $template = locate_template( 'single-game-screenshots.php' );
    return $template;
add_filter( 'single_template', 'wpd_game_template' );

on the main custom post type template (single-game.php), I have added a navigation menu to take you to the relevant endpoint URL:

                // Permalink structure for tab URls
                if ( ! get_option( 'permalink_structure' ) ) {
                    $permalink_structure = '&';
                    $trailing_slash = '';
                } else {
                    $permalink_structure = '';
                    $trailing_slash = "";

                <div class="game-post-tabs">
                    <nav class="game-tab-nav">
                        <a href="<?php echo get_permalink(); ?>">Overview</a>
                        <a href="<?php echo get_permalink() . $permalink_structure . 'related-articles' . $trailing_slash ; ?>">Related Articles</a>
                        <a href="<?php echo get_permalink() . $permalink_structure . 'review' . $trailing_slash ; ?>">Review</a>
                        <a href="<?php echo get_permalink() . $permalink_structure . 'screenshots' . $trailing_slash ; ?>">Screenshots</a>



The main single-game.php template loads fine and displays the_content() like it should, but the other endpoint URL’s all return 4040 page not found errors. I am doing this on a test site with WP_DEBUG and DEBUG LOG enabled but I am getting no errors at all, so I am at a complete loss as to what is going wrong.

Any help would be much appreciated, thanks.