Need help with .htaccess redirection for WordPress websites

I am changing the domain of my website.

But, I am struggling with the domain redirection. I need to implement this wildcard redirection.

So that I visit.

https://www.oldomain.com/page1

It should go to

https://newdomain.com/page1

Note: The new domain is without www.

Can anyone help me how to implement this?

Go to Source
Author: Nirmal Kumar

ANSWER

A 301 Redirect, or permanent redirect, is recommended when dealing with something similar to this one.

If you just want to hard redirect anything hitting oldomain.com to newdomain.com then a simple Redirect should do like so:

<VirtualHost *:443>
	ServerName oldomain.com
        ServerAlias www.oldomain.com
	Redirect 301 / https://newdomain.com
</VirtualHost>

The above example is also something that you will want to write in a server config like httpd.conf but not in a .htaccess file somewhere on your site directory. It is also clumsy since your old site’s pages – e.g https://www.domain.com/some/page/123 – will redirect only to https://newdomain.com which is the index page of the site.

So the other option would be Rewrite. It is also in case you don’t have root access to the server, and/or other sites that are not yours are sharing it as well. It would look like the following:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^oldomain.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.oldomain.com [NC]
RewriteRule ^(.*)$ http://newdomain.com/$1 [L,R=301,NC]

The above considers whether the request is written with or without the www subdomain in it. The old links or pages will also get carried over to the new one.

VNC on Ubuntu 20.04 without monitor

Since couple of days I am trying to set VNC Connection with my “server” Ubuntu desktop 20.04. I want to use it as remote workstation and I want to use gnome3 environment, VNC Connect or NoMachine (for better management). Everything works well as long as monitor is attached. As soon as I remove monitor – connection breaks. Ok, that’s how it works. I have created dummy screen…

sudo apt-get install xserver-xorg-video-dummy

With config based on this post:

Add Fake Display when No Monitor is Plugged In

I can access server, but it stuck on login screen with password prompt. When I put password, nothing happen. Still login screen with password prompt.

If anybody have any idea – please, help.

Regards

Go to Source
Author: sawax

How is a source RPM different from unpacking an RPM with rpm2cpio and cpio?

I am attempting to understand the use of a .srpm aka “source rpm” Red Hat Package Manager package. From what I understand so far, a .srpm is different from a standard .rpm in that it provides the source code and is commonly used during development. I am puzzled on why this is useful because if I run rpm2cpio ./myrpm-1.1-1.x86_64.rpm | cpio -idmv, I can still view the source code. As I understand, even standard RPMs pull down a .tar.gz/bz file which contains the source, and eventually builds this. Could you please clarify how source RPMs are different and why I would want to use one?

Go to Source
Author: the_endian

Ubuntu 20.04 Does Not Boot

ANSWER

Looks like this one just needs to have their GRUB re-written to MBR again. It’s not so hard. But given that I did something like this 8 years ago… The concept should still be the same. Steps of what I did to fix it here.

I originally had Ubuntu 18.04 installed on my dell xps 13 (2017). A couple days ago, I replaced it with Ubuntu 20.04 due to constant error messages. Until today, I was able to use it without any trouble.
However, I had to use Windows earlier today, and now when I was trying to boot Ubuntu back, I am unable to do so.

First error message

Unexpected return from initial read: Volume Corrupt buffersize 1000 Failed to load image EFIubuntugrubefi: Volume Corrupt start_image() returned Volume Corrupt

and then windows booted automatically.

In trying to resolve the issue,

  1. Tried reinstalling Ubuntu 20.04 using LiveUSB, but got the error saying the system doesn’t have EFI System Partition
  2. Consulted the forum https://ubuntu.forumming.com/question/5394/unexpected-return-from-initial-read-volume-corrupt.
    In running Boot Repair, I received an error message, sayin EFI System Partition is needed.
  3. Used GPart to try to tweak disk settings (changing the disk partition that holds Ubuntu File System from ext4 to fat32… I didn’t document this process very well)
  4. Followed a tutorial that used Windows command prompt and diskpart, creating an ESP.
  5. Reran Boot Repair (successfully this time)

However, now I encountered a GRUB error

“Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.”

I’ve been looking up different solutions, but I am having trouble understanding them, and afraid I am messing my disk more and more.

Thank you in advance.

Go to Source
Author: Amanda Jeong

how to get specific character from a log file in linux

ANSWER

Assuming that (1) the log file looks as it is AND (2) it is multi-line, then a simple Linux grep command like below should work (even with multiple lines of that line you’re looking for in one log file):

INPUT | Tested it on dummy logs from sample

COMMAND | grep -Pn "^Id\s+:\s+(.*)$" *.log

OUTPUT |

log101.log:2:Id : UN123P

log102.log:2:Id : HELLO321

log103.log:2:Id : STUDE23P

log104.log:2:Id : Lorem

log104.log:7:Id : IPsum

log104.log:12:Id : Dolor

have a log file , having multiple contents inside the file like and example below is the content of U123.log . I have n number of logs..

Accepted password for hoover from 10.0.2.2 port 4792 ss

Id : UN123P 

ID_MTCH : UnixProduction

Accepted password for hoover from 10.0.2.2 port 4792 ss

Accepted password for hoover from 10.0.2.2 port 4792 ss

Is there any we can fetch “Id : UN123P” as an output of linux command. We have some 1000’s of logs and from all the logs , trying to fetch the value only starts with ID : and output as “Id : UN123P”

Pls suggest

Go to Source
Author: Arya

no wifi connection with ubuntu

no wifi connection with ubuntu

I recently purchased a used Samsung Galaxy Book and after experiencing the Win 10 dual booted with Ubuntu 20.04.
I have been researching the forums but I am still unable to make the wifi work or even find any signals.
As a last resort I have also installed Connman hoping it would find the connection but no luck.
Some of the information is listed below
Thank you
Code:

ubuntu@ubuntu-Galaxy-Book-12:~$ rfkill list
0: hci0: Bluetooth
Soft blocked: no
Hard blocked: no

*-network
description: Network controller
product: QCA6174 802.11ac Wireless Network Adapter
vendor: Qualcomm Atheros
physical id: 0
bus info: pci@0000:01:00.0
version: 32
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list
configuration: driver=ath10k_pci latency=0
resources: irq:131 memory:df400000-df5fffff
*-network
description: Ethernet interface
physical id: 1
bus info: usb@2:4.2.2
logical name: enx00909e9dd80e
serial: 00:90:9e:9d:d8:0e
size: 1Gbit/s
capacity: 1Gbit/s
capabilities: ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes driver=ax88179_178a duplex=full ip=192.168.1.64 link=yes multicast=yes port=MII speed=1Gbit/s

ubuntu@ubuntu-Galaxy-Book-12:~$ sudo ifconfig wlan0 up
[sudo] password for ubuntu:
wlan0: ERROR while getting interface flags: No such device
ubuntu@ubuntu-Galaxy-Book-12:~$ ip link set wlan0 up
Cannot find device “wlan0”
ubuntu@ubuntu-Galaxy-Book-12:~$ iwconfig
enx00909e9dd80e no wireless extensions.

lo no wireless extensions.

Go to Source
Author: Smokeyone

Ubuntu 18.04 automatically logs out when I close the laptop lid

Ubuntu 18.04 automatically logs out when I close the laptop lid

I have 18.04 on my lenovo legion. Usually, when I go to bed I close the lid and the computer goes into suspend/sleep and when I wake up, I unlock it and pick up where I left. But very recently- last week or 2, when I close the lid and wake up in the morning, I find that ubuntu has logged me out. and of course, when I log back in, all windows and apps are closed, sometimes I lose my progress on unsaved projects and the sites I wanted to have open.

does anyone else face this issue? my guess is that I have nvidia 430.50 driver and I installed it along with tensorflow. But recently the system shows this partial update warning and the only packages there are the nvidia driver 440.59 version. I don’t want to break my tensorflow installation and also potentially break the os by installing it. Any advice?

Go to Source
Author: alonzo golanzo

Why won’t Gmail allow me to change my profile picture?

Why won’t Gmail allow me to change my profile picture?

I've tried many and multiple times to change my profile picture. all it says is, "Sorry, you can't change this photo for this account." It'll keep saying that over and over again. I hate my profile picture. I just wanted to change it because everyone in my online classes are making fun of me for having this profile pic. I've tried going through "About Me" and it just won't let me. I just want to change it and get out of this terrible bullying. Please, if you know how to do it, please notify me. Thank you.

Go to Source
Author: LilSketchWolf

Change Font color and size when booting into CLI ubuntu 20.04 LTS

Change Font color and size when booting into CLI ubuntu 20.04 LTS

I was wondering if there was a way to increase font size and change font colour when booting into CLI.
The font is small and white on black, I want it to change the font colour.
If anyone can help, that would be great.
I am ready to provide any system details if needed.
Thanks

Go to Source
Author: Ammar

Trying to upgrade to a new release version, having trouble with /etc/apt/sources.list

Trying to upgrade to a new release version, having trouble with /etc/apt/sources.list

I am trying to upgrade to a new release version following the instructions of the accepted answer here.

Someone mentioned in the comments section of the OP’s question that you should change http://old-releases.ubuntu.com/ubuntu/ to http://us.archive.ubuntu.com/ubuntu/
so that’s what I did. The current state of my sources.list file is as shown below.

enter image description here
enter image description here

When I try to run sudo apt-get update && sudo apt-get dist-upgrade, I get

Ign:1 http://us.archive.ubuntu.com/ubuntu disco InRelease
Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease                                                            
Ign:3 http://us.archive.ubuntu.com/ubuntu disco-updates InRelease                                                            
Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease                              
Hit:5 https://repo.skype.com/deb stable InRelease                                         
Ign:6 http://us.archive.ubuntu.com/ubuntu disco-backports InRelease                       
Hit:7 http://ppa.launchpad.net/bit-team/stable/ubuntu disco InRelease
Ign:8 http://us.archive.ubuntu.com/ubuntu disco-security InRelease
Err:9 http://us.archive.ubuntu.com/ubuntu disco Release                            
  404  Not Found [IP: 91.189.91.39 80]
Err:10 http://us.archive.ubuntu.com/ubuntu disco-updates Release                   
  404  Not Found [IP: 91.189.91.39 80]
Err:11 http://us.archive.ubuntu.com/ubuntu disco-backports Release
  404  Not Found [IP: 91.189.91.39 80]
Err:12 http://us.archive.ubuntu.com/ubuntu disco-security Release
  404  Not Found [IP: 91.189.91.39 80]
Ign:13 http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco InRelease
Err:14 http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco Release
  404  Not Found [IP: 2001:67c:1560:8008::15 80]
Reading package lists... Done
E: The repository 'http://us.archive.ubuntu.com/ubuntu disco Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-updates Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-backports Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

What should I do?

Go to Source
Author: An Ignorant Wanderer

Install driver rtl8814au on ubuntu 20.04

Install driver rtl8814au on ubuntu 20.04

Based on this

Install driver rtl8814au on ubuntu 18.04

I installed manually (make && make install) the driver when I had the kernel

$ uname -r
5.4.0-26-generic

Now, ubuntu 20.04 wants to install the new one:

linux-image-5.4.0-29-generic

I did it before (upgrade the system then, the kernel) and the driver stopped to work, even I installed thousand times, was impossible to up the driver which logical name is “wlx50c4ddcf488e”.

The installation I made:

$ sudo apt install build-essential
$ sudo apt install bc
$ sudo apt install linux-headers-`uname -r`
$ sudo apt install git

$ git clone https://github.com/aircrack-ng/rtl8812au.git

$ cd rtl8812au
$ make && sudo make install

Does anyone has idea about what can I do? Now, I cannot upgrade my system without losing the wireless connection.

Thank a lot.

Go to Source
Author: Ibringpies