redirecting urls of a certain pattern to another site

I have a website. The root directory of my site in cpanel was like this: http://www.example.com/b. But, I have changed my root directory to http://www.example.com/s.
Now I want to redirect every url of the pattern like http://www.example.com/b, www/example.com/b/c/text/php etc. to this url: http://www.example.com/s. Is there any way to do this in cpanel?

Advertisements

Change default redirect after login in Laravel 5.6

I am beginner in laravel. i’m using udemy videos to learn laravel. I wanna to change default redirect after login.
I change route to

Route::group(['prefix' => 'admin', 'middleware' => 'auth'],function (){
    Route::get('/home', 'HomeController@index')->name('home');
});

and in Http/Middleware/RedirectIfAuthenticated.php

 public function handle($request, Closure $next, $guard = null)
    {
        if (Auth::guard($guard)->check()) {
            return redirect('/admin/home');
        }

        return $next($request);
    }

but when I login again I redirect to /home instead of /admin/home.
I clear cache but it doesn’t work true again.

Put div in Woocommerce single-product page

I need to do some styling to the Woocommerce single product page: I need a border around the price(which I moved above the add to cart button), in stock status, add to cart button and meta data. So basically a visual border around these items:
https://postimg.cc/image/jp6e1hpa9/

Since they are not in one specific div, I need to place a new div around them. How can I add this div around the above mentioned items?

PHP array_merge nulls array

I’m trying to populate existing array with found values from another array.

Code looks like:

$aAttachmentsList = array();

foreach($aAttachments as $sAttachment)
{
    foreach ($oDocumentManifestEntry  as $property => $value)
    {

        $aAttachmentsList = $aAttachmentsList + $value->content;

    }
}

where the content can looks like

  [
  {
    "attachment":
    {
        "url": "Binary/1848766036104970",
        "title": "Test"
    }
  },
  {
    "attachment":
    {
        "url": "Binary/1848766395105180",
        "title": "PNG image"
    }
  },
  {
    "attachment":
    {
        "url": "Binary/1848766395105200",
        "title": "RTF file"
    }
  }
]

it works at first pass but at second it will assign null as $aAttachmentsList

Thoughts?