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?


Recommended Posts

Posted

Does anyone here have a local host environment on a Mac? If you do, does your dev site work with friendly URLs on?

I’m just checking before I go about this a different way.

  • 10 months later...
Posted

was there any way to fix this? Im having this same issue on a linux server. Everything is working fine except for friendly urls.

I tried setting up the Virtual Host files and htaccess files but nothing seems to work.

Posted

@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

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...