Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

What is mod_rewrite and can it be used on SIRSTEVEHQ CP hosting?

What is Mod-Rewrite?

Mod-rewrite is an Apache module used for the purpose of rewriting URLs. mod-rewrite is implemented via specific rules added to the .htaccess file. 

The purpose of the rules is to control how URLs are displayed or alternatively how incoming requests get processed by the server. 

What are the purposes of Mod-Rewrite? 

There are different ways of manipulating URLs via Mod-Rewrite these include:

URL Redirection: used for redirecting one URL to another for example a common use of this is redirecting HTTP requests to HTTPS.

<IfModule mod_rewrite.c>
	RewriteEngine On
	RewriteCond %(HTTPS) !=on
	RewriteRule ^ https://%(HTTP_HOST)%(REQUEST_URI) [L,R=301]
</IfModule>

URL Rewriting: URLs can be rewritten dynamically based on certain conditions using regular expressions. Examples of this include making URLs more user-friendly and easy to remember, also rewriting URLs can result in better SEO results. 

example.com/product.php?id=123

to a more user-friendly version:

example.com/product/123

URL Blocking/Filtering: URLs can also be blocked or filtered based on Mod-rewrite rules added to the .htaccess. This can be useful for blocking malicious requests to the site or restricting access to certain website areas. 

Is Mod-Rewrite enabled on SIRSTEVEHQ CP?

Mod-rewrite is enabled by default on the SIRSTEVEHQ CP platform, meaning whether, your site is on Windows, Linux or WordPress you can make use of Mod-rewrite.

The only limitation to Mod-rewrite on the SIRSTEVEHQ CP shared hosting platform is that Mod-rewrite can't be used to rewrite any URLs within the uploads folder of a WordPress site due to security rules implemented. 

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

What is Autoscale? - SIRSTEVEHQ CP

Autoscale is our latest hosting solution designed specifically for demanding websites that...

Do you disallow any WordPress plugins on your WordPress platform? - SIRSTEVEHQ CP

Our WordPress platform was designed and built exclusively for WordPress. This level of platform...

Temporary URLs: what are they and what are they used for? - SIRSTEVEHQ CP

When you order a Cloud hosting or WordPress hosting, you're automatically given a temporary URL....

Providing Access Logs to a Third-Party provider - SIRSTEVEHQ CP

Some third-party providers may request access logs for investigation (i.e. Google AdWords). You...

Complete guide to the SIRSTEVEHQ CP File Manager

In this guide we’ll go through the features of the SIRSTEVEHQ CP File Manager to show how you can...