TurnKey Linux Virtual Appliance Library

cant get mod_rewrite working!!

ridinglowest's picture

All I am trying to do is get mod_rewrite to work on turnkey linux and so far having no luck.

  1. I went to the webmin under apache > configure apache modules > I checked rewrite and saved ( I looked to see if it was and is )
  2. I check my phpinfo file and under Loaded Modules. It is there.
  3. Uploaded a new .htaccess file to my directory /var/www/projects/jsnew/.htaccess
The contents of the htaccess are:
RewriteEngine on
RewriteRule ^index.php$ about_us.php

I should be seing about_us page with inde.php url and I am not.

Is there anything else I need to do from with in webmin?

Neil Aggarwal's picture

Start with slash

I think your RewriteRule has to start with a slash:

RewriteRule ^/index.php$ /about_us.php

Try that and see if it helps.

Try our TurnKey Linux appliance hosting FREE!

Jeremy Selph's picture


nah I tried that and still doesnt work. There has to be something else here that isn't allowing mod_rewrite to work. Are there any other config files?

Neil Aggarwal's picture


I just followed your steps on a LAMP appliance and the rewrite is working.

This url:

Gives me the content of the about.php page.

I followed the exact same steps you stated above:

1. Enabled the rewrite module in Webmin
2. Created an .htaccess file with this content:

RewriteEngine on
RewriteRule index.php about.php

I don't know what to say.

Try our TurnKey Linux appliance hosting FREE!

Jeremy Selph's picture

what build are using

what build or turnkey are you using?

Neil Aggarwal's picture


I am using the LAMP appliance from here:


So, it is 2009.10

I installed it from the ISO file.

Did you get my message with the login info to my appliance so you can try it?

Try our TurnKey Linux appliance hosting FREE!

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)