Portal Home > Knowledgebase > Frequently Asked Questions > How do I check if Apache mod_rewrite is working

How do I check if Apache mod_rewrite is working

Add the following in the .htaccess file:

RewriteEngine On
RewriteRule ^test.html$ /test2.html [R=301]

If mod_rewrite works, this will redirect the test.html file to test2.html

In the test.html file place text: Does not work
In the test2.html file place text: Work


Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
What is cPanel (Views: 2162)
Do you offer DNS hosting (Views: 2441)

* Minimum sign up periods for cPanel Web Hosting plans: Mini - 3mo., Pro - 1mo., Biz - 1mo., cPanel Reseller Hosting, Linux VPS, Windows VPS, Managed cPanel VPS and Dedicated Servers - 1mo. secret link
Accepted payments: Credit/Debit Card, Paypal, Payza, Skrill, WebMoney, CashU, Ukash, paysafecard, Bitcoin, Perfect Money, SolidTrust Pay, OKPay, EgoPay, Western Union/MG, Wire Transfer and more.