Enabling URL-Rewriting on FreeBSD's Apache 2.4.12

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Locked
bsd_42
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Aug 10, 2015 11:07 pm

Enabling URL-Rewriting on FreeBSD's Apache 2.4.12

Post by bsd_42 » Tue Aug 11, 2015 12:11 pm

Hello,

I'm an absolute beginner in Joomla, so I'm playing with it right now on
a FreeBSD 10.1 test server running Apache 2.4.12. Since I've had to do
some head scratching to get rid of 'index.php' in the URLs, I'd like to
share this recipe that works for me:

1. In /usr/local/etc/apache24/httpd.conf, uncomment the line:
LoadModule rewrite_module libexec/apache24/mod_rewrite.so

to enable mod_rewrite.

2. Enable .htaccess in the directory or directories where you
install joomla, by adding lines like these in httpd.conf (adjust
as needed):

<Directory "/usr/local/www/apache24/data/joomla1/">
AllowOverride All
</Directory>

The example above assumes that the DocumentRoot hasn't been
changed from the default /usr/local/www/apache24/data and that
the Joomla zip file has been unpacked in joomla1 subdirectory.

3. Restart Apache:

# /usr/local/etc/rc.d/apache24 restart

You can check that mod_rewrite is enabled in the administrator interface
(System / System information / PHP Information -> Look for mod_rewrite)

Then, you can

# mv htaccess.txt .htaccess

in /usr/local/www/apache24/data/joomla1

and in the administrator interface: System / Global configuration,
set Use URL Rewriting to Yes (and Save).

That's all it takes.

Locked

Return to “Installation Joomla! 3.x”