Jump to content
thirty bees forum

Does anyone use a local host environment on a Mac? Does your dev site work with friendly URLs ON?


alwayspaws

Recommended Posts

  • 10 months later...

@traumflug said in Does anyone use a local host environment on a Mac? Does your dev site work with friendly URLs ON?:

Friendly URLs need Apache module rewrite. One can enable in on Linux like this: sudo a2enmod rewrite sudo service apache2 restart

I already tried that.

I found the answer to this.

You have to configure the VirtualHost file on your apache server located in "/etc/apache2/sites-available" and add this bit:

``` DocumentRoot /var/www/html RewriteEngine on

<Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Require all granted
    </Directory>

```

If you have .htaccess files but this is not set on your server the server will simply ignore the .htaccess files completely seems to be.

After having this in place friendly URLs started working without issues.

So in short your web server must have all this in order to work with friendly urls:

  • install mod_rewrite
  • enable mod_rewrite
  • configure virtualhost file
  • configure .htaccess file

If all that is done, friendly urls should work... if ANY of those is missing then you will encounter the problem shown by OP

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...