.htaccess redirect

Apache .htaccess 301 redirect is a server side redirect and is a permanent redirect.

The .htaccess file is an Apache server configuration file. The .htaccess file is used per directory.

Using .htaccess file reduce server performance. .htaccess use should be avoided when you have access to the Apache server main configuration file httpd.conf. Shared hosting websites usually don't have access to httpd.conf file and should use .htaccess file.

This 301 redirect response notifies the search engines that the page has moved permanently from the old URL to the new URL.

The search engines also transfer the old URL page rank to the new URL.

.htaccess redirect

Add this code or create new .htaccess file in the old-page.html directory.

Single URL redirect

Permanent redirect from old-page.html to new-page.html.


Redirect 301 /old-page.html http://www.mydomain.com/new-page.html

Entire domain redirect

Permanent redirect from all domain pages to newdomain.com.

.htaccess file should be at the old website's root directory.


Redirect 301 / http://www.newdomain.com/

Enabling .htaccess configuration

If you uploaded .htaccess file to the old-page.html directory and the redirection does not work, it usually means that the .htaccess files are not enabled in the Apache server configuration file httpd.conf.

The .htaccess file can be enabled by adding the Apache server's httpd.conf file.


<Directory /srv/www/justfreetools.com/public_html/web/dev/redirect>
  AllowOverride All

Important: this setting is not reccomended since it slows down the Apache server.

httpd.conf redirect

If you have permission the change the httpd.conf file, it is better to add the Redirect directive in the httpd.conf instead of the .htaccess file.

Check if rewrite module's library mod_rewrite.so is loaded by the apache server:

$ apache2ctl -M


Add the following code to httpd.conf file.

If rewrite module's library mod_rewrite.so is not available, uncomment the first line to load the rewrite module.


# LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
<Directory /srv/www/justfreetools.com/public_html/web/dev/redirect>
   Redirect 301 /old-page.html http://www.mydomain.com/new-page.html


Don't forget to restart the Apache server after httpd.conf update:

$ sudo /etc/init.d/apache2 restart

Currently, we have around 5664 calculators, conversion tables and usefull online tools and software features for students, teaching and teachers, designers and simply for everyone.

You can find at this page financial calculators, mortgage calculators, calculators for loans, calculators for auto loan and lease calculators, interest calculators, payment calculators, retirement calculators, amortization calculators, investment calculators, inflation calculators, finance calculators, income tax calculators, compound interest calculators, salary calculator, interest rate calculator, sales tax calculator, fitness & health calculators, bmi calculator, calorie calculators, body fat calculator, bmr calculator, ideal weight calculator, pace calculator, pregnancy calculator, pregnancy conception calculator, due date calculator, math calculators, scientific calculator, fraction calculator, percentage calculators, random number generator, triangle calculator, standard deviation calculator, other calculators, age calculator, date calculator, time calculator, hours calculator, gpa calculator, grade calculator, concrete calculator, subnet calculator, password generator conversion calculator and many other tools and for text editing and formating, downloading videos from Facebok (we built one of the most famous Facebook video downloader online tools). We also provide you online downloanders for YouTube, Linkedin, Instagram, Twitter, Snapchat, TikTok and other social media sites (please note we does not host any videos on its servers. All videos that you download are downloaded from Facebook's, YouTube's, Linkedin's, Instagram's, Twitter's, Snapchat's, TikTok's CDNs. We also specialise on keyboard shortcuts, ALT codes for Mac, Windows and Linux and other usefull hints and tools (how to write emoji online etc.)

There are many very usefull online free tools and we would be happy if you share our page to others or send us any suggestions for other tools which will come on your mind. Also in case you find any of our tools that it does not work properly or need a better translation - please let us know. Our tools will make your life easier or simply help you to do your work or duties faster and in more effective way.

These below are the most commonly used by many users all over the world.

And we are still developing more. Our goal is to become the one-stop, go-to site for people who need to make quick calculations or who need to find quick answer for basic conversions.

Additionally, we believe the internet should be a source of free information. Therefore, all of our tools and services are completely free, with no registration required. We coded and developed each calculator individually and put each one through strict, comprehensive testing. However, please inform us if you notice even the slightest error – your input is extremely valuable to us. While most calculators on Justfreetools.com are designed to be universally applicable for worldwide usage, some are for specific countries only.

Page Id: 1508

This website uses cookies to improve your experience, analyze traffic and display ads. Learn more