Richard Castera - Explorations in Software Development
Richard Castera - Explorations in Software Development
Browsing Tag
apache
Resources Scripts Web Server

Enable cURL with XAMPP

May 3, 2010 3 Comments

cURL is disabled by default in your XAMPP installation. To enable it, you have to modify the php.ini files in your XAMPP folder. Follow the steps below to get it up and running.

  1. Locate the following files:
    INI
    1
    2
    3
    C:\Program Files\xampp\apache\bin\php.ini
    C:\Program Files\xampp\php\php.ini
    C:\Program Files\xampp\php\php4\php.ini
  2. Uncomment the following line on your php.ini file by removing the semicolon.
    INI
    1
    ;extension=php_curl.dll
  3. Restart your Apache server.
  4. Check your phpinfo if curl was properly enabled.
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts Web Server

How to setup a local web server on your computer using XAMPP

April 3, 2010 20 Comments

Web development work should always be done locally. When developing a website, all the development work should be done on a local LAMP Stack environment installed on your computer. That way, the production time is greatly reduced and you can fully test your work before launching.

When you are completely done developing your project, the migration to the live server is seamless. Here are the simple steps to install a local server on your PC to easily develop websites.

This article applies to the installation on Windows 98, NT, 2000, 2003, XP and Vista, of Apache, MySQL, PHP + PEAR, Perl, mod_php, mod_perl, mod_ssl, OpenSSL, phpMyAdmin, Webalizer, Mercury Mail Transport System for Win32 and NetWare Systems v3.32, Ming, JpGraph, FileZilla FTP Server, mcrypt, eAccelerator, SQLite, and WEB-DAV + mod_auth_mysql.

Continue reading
Reading time: 2 min
Share:
Written by: rcastera
Resources Scripts Web Server

How to Create a Custom 404 Error page with .htaccess

October 20, 2009 2 Comments

Everyone’s encountered those standard 404 error pages that yield little or no information. Most new systems have this feature built in by default and often times are pretty fancy with informative to funny graphics and lots of options on what to do next but, if your working on updating an old site not using dynamically based web pages then, your going to have to add one manually. For your user’s experience, it’s better to provide a helpful error message and links to where they can continue on their quest for information. You don’t want to scare your visitors away do you? Here’s how to add your own custom 404 error page to your website:

If you don’t already have an .htaccess file in your servers root, go ahead and create one. Now you need to instruct .htaccess where your custom error page is. In this example, I have the 404 document which I created with my editor that provides lots of useful information for users to continue browsing my site. Now add this line to your .htaccess file and that’s it!

Apache
1
ErrorDocument 404 /404.html
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts Web Server

Disallow hotlinking while allowing requests from robots.txt and favicons

October 18, 2009 No Comments

We all hate Leechers. Here’s how to stop them in their tracks from stealing your images and your bandwidth!

Apache
1
2
3
4
5
6
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !(^/robots\.txt|\.ico)$
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?example.com(/)?.*$ [NC]
RewriteRule .*\.(gif|jpg|jpeg|bmp|pdf)$ [F,L]
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Web Server

Creating an .htaccess file on Windows

October 9, 2009 3 Comments

Everyone who has tried creating a .htaccess on windows knows that Windows Explorer does not accept the ‘.’ character as the first character of a file. For most of you this may be old stuff, but for the newbies, the quick way to create a file that starts with a ‘.’ is actually pretty simple.

Open notepad and save the document with file name .htaccess with the ‘save as type’ set to ‘All Files’; or save the document with file name as “.htaccess” including the quotes. Hope this helps someone!

Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts Web Server

htaccess – How to redirect all http (port 80) requests to https (port 443)

September 13, 2009 4 Comments

Sometimes you may need to redirect http requests on port 80 to (https) on port 443. This can easily be accomplished with .htaccess.

Apache
1
2
3
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [NC,R,L]
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Resources Scripts Web Server

.htaccess – Limit website access by IP

May 31, 2009 4 Comments

I’ve been asked many times how to limit website access by allowable IP’s. This is fairly simple to accomplish with .htaccess and very useful for blocking web vagrants to allowing you to make updates to a website while redirecting all other IP’s to a maintenance page. Simply follow the steps below:

  1. Create a file and name it .htaccess.
  2. Add The following to the file:
    Apache
    1
    2
    3
    order deny,allow
    deny from all
    allow from 255.255.255.255
  3. Replace 255.255.255.255 with you IP address. (If you don’t know it, you can get it here: WhatsMyIP)
  4. Once the file is created, put it in the root directory. That’s it!
Continue reading
Reading time: 1 min
Share:
Written by: rcastera
Web Server

Adding 301 Redirects using htaccess

June 7, 2008 4 Comments

It’s easy adding 301 redirects to your website using Apache’s htaccess. A 301 redirect is the most efficient and Search Engine Friendly method for web page redirection. It’s not difficult to implement and will preserve your search engine rankings as well.

Often when someone does a redesign of their website or puts it into a new platform, and little consideration is regarded for the difference between the existing an new link structure. You should have a redirect in place if your old link structure varies from the new one. This will help you maintain you search engine rankings and decrease the possibility if someone reaching a 404 page.

Continue reading
Reading time: 1 min
Share:
Written by: rcastera

About me

Hello, my name is Richard Castera. I have more than 12 years of experience architecting, implementing, leading and launching large scale, high performance software products in a fast-paced agile environment.

Popular Posts

Magento – Display new products on the home page

May 20, 2009

How to Fix “Internet Explorer Cannot Open the Internet Site- Operation Aborted” Error

May 9, 2009

PHP – Convert Array to Object with stdClass

July 5, 2009

Categories

  • Home Automation
  • Resources
  • Scripts
  • SEO
  • Thoughts
  • Web Server

Tags

Apache Apple Bash CSS Drupal Free home automation htaccess Java Javascript Magento PHP raspberry pi SEO SQL thoughts Wordpress

© 2019 copyright Richard Castera // All rights reserved