by Gabriel Pioaru | Jul 27, 2017 | Automations
To extract the actual URl from the hyperlinks in Excel (the url address), you will need to create a function in Visual Basic. Don’t worry, it’ actually less complicated then you think.
- Press down ALT and F11 to open up the Microsoft Visual Basic for Applications.
- Click Insert then go to Module and insert the code below inside the module window.
Function GetURL(pWorkRng As Range) As String
'Updateby20140520
GetURL = pWorkRng.Hyperlinks(1).Address
End Function

- Save the code before you close the window.
- Go back to your sheet and select a blank cell (where you want to display the URL) and type =GetURL(A1) formula.
- Press Enter and you’ll be able to see the hyperlink address is extracted.
That’s it!
by Gabriel Pioaru | Jun 15, 2017 | WordPress CMS
Access your website via FTP or via your server's File Manager and search at the root of your WordPress instalation for the .htaccess file. Here you have 3 solutions to solve the same question:
How to redirect all HTTP request to HTTPS.
Before you edit the .htaccess file, I recommend to make a backup to be able to revert your changes (in case something goes wrong).
So here you go, copy and paste the code below in your .htaccess file, save it, and re-upload it.
Solution 1
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
These lines of code will direct all HTTP requests to https://www.example.com as well as redirect https://example.com to https://www.example.com.
Solution 2
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
RewriteCond %{http_host} ^example.com [NC]
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Solution 3
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^domain.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.domain.com$ [OR]
RewriteCond %{HTTPS_HOST} ^domain.com$
RewriteRule ^(.*)$ "https\:\/\/www\.domain\.com\/$1" [R=301,L]
Leave a comment with what worked for you. Go ahead and share if you have a different aproach.
by Gabriel Pioaru | Jun 15, 2017 | WordPress CMS
If you have multiple categories that are paged on your blog, you may want to show the Category Description only on the first category page.
You may wonder how can I achive this.
It’s not that hard to do it as long as you follow the steps I provide.
- Connect to your FTP account and search inside your theme folder for the file archive.php. If it’s a premium theme, you should have one in you main theme folder or mabe other subfolder.
- Once you’ve identified the file, go ahead and download (to have a backup copy might be a good idea) and then open it up for editing.
- Now you’ve got to identify something similar to the code below and replace it with this one.
[cc lang=”php”]
<?php
if (is_category()) {
$page = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
if ($page == 1) {
echo category_description();
//you don’t need to include the category id on the actual
// category page – wordpress figures it out.
}
}
?>
[/cc]
And that’s it, pretty simple eh?
If you found this helpful please leave a comment and subscribe to my newsletter for all my latest content.
by Gabriel Pioaru | Nov 22, 2015 | Web Servers
I got a new server and a new website and now my website is not working with www prefix, but is accessible without www prefix.
The solution of this problem it has a easy fix, but it involves 2 different actions:
- Adding a DNS Record
- Redirecting a www to non-www (as this was my goal)
After I had installed a new website on a newsite.domain.com subdomain it worked perfectly, but when i type the www prefix i get “the webpage is not available” kind of error.
To put things in perspective, I use a Digital Ocean Droplet with ISPConfig 3 Server on a Debian Jessie OS. But this can work on a wide range of configurations.
Here is how I fixed this:
First step go to Digital Ocean website and sign in:
- Login to Digital Ocean Account account
- Go to Networking> Domains> select yourdomain.com
- Add a new A Record like this: www.newsite in “Enter Name” field and your droplet IP in “Host” filed like you see below.
- Hit Create A Record button and you`re done!

Remember to change with YOUR IP address of your sever.
I asume that you already have the non www record added, if you don`t do the same thing without the www in front of your newsite subdomain like you can see below.

Note! If you have a cPannel you can add that record in your cPannel dashboard, DNS section
Second step – go to your ISPConfig dashboard and login
- Go to Sites> select your site (subdomain in my case) and click on it
- Then open the Redirect tab
- At Redirect Type select R=301,L
- From SEO Redirect select www.domain.tld => domain.tld
This is it!
Do you have a better solution? I`ll be happy to hear about it!
by Gabriel Pioaru | Oct 17, 2015 | Web Servers
When you manage more then one ISPConfig server or multiple websites, it just happens sometimes to forget the passwords (in case you didn`t write them down) or can`t find the file where you put them.
Don`t worry! There is a simple way to reset your ISPConfig admin password .
To change your ISPConfig admin password: Get your mysql password first!
/usr/local/ispconfig/server/lib/mysql_clientdb.conf.
I use putty to login to my console. You can also do this in virtual console from your droplet.
So, let`s go!
– In the terminal type the commands below, in the right order as shown:
mysql -u root -p
– select your database
use dbispconfig;
– And insert the next query
UPDATE sys_user SET passwort = md5('newpass') WHERE username = 'admin';
(Replace your “newpass” with one that you desire.)
After this you can login again with your user and new password through server interface.
This is all that you have to do!