# Mod\_rewrite not enabled?

**URL:** <https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814>\
**Category:** Hosting Support\
**Created:** [July 22, 2026, 4:40am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814 "2026-07-22T04:40:35Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![joker197cinque](https://forum.infinityfree.com/letter_avatar/joker197cinque/32/6_449c533f586939b6e5f246632a46421f.png) [@joker197cinque](https://forum.infinityfree.com/u/joker197cinque)\
**Post date:** [July 22, 2026, 4:40am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/1 "2026-07-22T04:40:35Z")

</div>

### Website URL

Mod\_rewrite seems not enabled

### Error Message

Hi guys,  
I was trying to use mod\_rewrite and I created a simple .htaccess and saved it into my htdocs folder.  
The file contains just RewriteEngine on but I get the error page:

Something Went Wrong!

Our apologies, but the website has encountered an error and cannot display this page at the moment.

The issue is likely due to a code error within the .htaccess file, which controls important server configurations. This error is not related to any PHP files or other website code.

If I comment that line, everything works.

Also, I tried this PHP and it tells me NOT AVAILABLE:

\<?php if (function\_exists('apache\_get\_modules')) { echo in\_array('mod\_rewrite', apache\_get\_modules()) ? 'mod\_rewrite ACTIVE' : 'mod\_rewrite INACTIVE'; } else { echo 'apache\_get\_modules() NOT AVAILABLE'; } ?\>

Older discussions in the forum say mod\_rewrite is enabled .. .but it does it seem the case now.

Can you please help?

Thanks

---

<div class="post-metadata">

**Author:** ![Meishin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/meishin/32/59902_2.png) [@Meishin](https://forum.infinityfree.com/u/Meishin)\
**Post date:** [July 22, 2026, 6:09am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/2 "2026-07-22T06:09:28Z")

</div>

`mod_rewrite` is enabled. A lot of PHP functions have been disabled due to security concerns and your script specifically use `NOT AVAILABLE` to indicate the function rather than the module is missing.

Make sure that you didn’t misspell the line.

---

<div class="post-metadata">

**Author:** ![joker197cinque](https://forum.infinityfree.com/letter_avatar/joker197cinque/32/6_449c533f586939b6e5f246632a46421f.png) [@joker197cinque](https://forum.infinityfree.com/u/joker197cinque)\
**Post date:** [July 22, 2026, 7:40am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/3 "2026-07-22T07:40:44Z")

</div>

If I put only this, without any rules:

RewriteEngine On

I get no errors.

If I try to add some other lines, like for example:

RewriteBase /

or

RewriteCond %{REQUEST\_FILENAME} !-f

or

RewriteRule ^language/([a-z]{2})/?$ index.php?lang=$1 [L,QSA]

I get the same error page as before.

I don’t really don’t know how to proceed, any hint please ?

Thanks

---

<div class="post-metadata">

**Author:** ![Meishin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/meishin/32/59902_2.png) [@Meishin](https://forum.infinityfree.com/u/Meishin)\
**Post date:** [July 22, 2026, 7:47am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/4 "2026-07-22T07:47:27Z")

</div>

I tried several rewrite rules and all of them is working. WordPress (which relies on rewrite rules) also works perfectly which probably means that it’s on you, not the servers.

---

<div class="post-metadata">

**Author:** ![joker197cinque](https://forum.infinityfree.com/letter_avatar/joker197cinque/32/6_449c533f586939b6e5f246632a46421f.png) [@joker197cinque](https://forum.infinityfree.com/u/joker197cinque)\
**Post date:** [July 22, 2026, 8:03am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/5 "2026-07-22T08:03:20Z")

</div>

It’s on me maybe you are right but why RewriteEngine On no errors and adding a simple line RewriteBase / make it fail ?

---

<div class="post-metadata">

**Author:** ![Meishin](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/meishin/32/59902_2.png) [@Meishin](https://forum.infinityfree.com/u/Meishin)\
**Post date:** [July 22, 2026, 8:05am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/6 "2026-07-22T08:05:46Z")

</div>

I still have no idea what **exact** `.htaccess` rules you have been using on your website. Would you please share the actual code?

---

<div class="post-metadata">

**Author:** ![joker197cinque](https://forum.infinityfree.com/letter_avatar/joker197cinque/32/6_449c533f586939b6e5f246632a46421f.png) [@joker197cinque](https://forum.infinityfree.com/u/joker197cinque)\
**Post date:** [July 22, 2026, 8:38am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/7 "2026-07-22T08:38:51Z")

</div>

I recreated different rules and now it seems to work. I don’t really know .. rules were done by Gemini.  
thanks for help btw

---

<div class="post-metadata">

**Author:** ![dan3008](https://forum.infinityfree.com/user_avatar/forum.infinityfree.com/dan3008/32/68577_2.png) [@dan3008](https://forum.infinityfree.com/u/dan3008)\
**Post date:** [July 22, 2026, 8:42am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/8 "2026-07-22T08:42:48Z")

</div>

> [@joker197cinque](#):
>
> rules were done by Gemini.

That’s likely your problem then. In my experience, AI seems to struggle with .htaccess rules. Even Claude which is one of the better ones for coding really doesn’t seem to get them quite right

---

<div class="post-metadata">

**Author:** ![system](https://infinityfree-forum-uploads.s3.dualstack.eu-central-1.amazonaws.com/original/3X/b/0/b024fd3fa88bae093c9576e55c2c94e33f890206.svg) [@system](https://forum.infinityfree.com/u/system)\
**Post date:** [July 29, 2026, 8:43am UTC](https://forum.infinityfree.com/t/mod-rewrite-not-enabled/119814/9 "2026-07-29T08:43:05Z")

</div>

Closed on July 29, 2026, 8:43am UTC

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
