apache2 mod_rewrite

At this stage I've spent a couple of hours trying to work this out, I've gone through every tutorial I found trying to get the mod rewrite to work but still nothing seems to be reading the .htaccess files

In this file sudo nano /etc/apache2/sites-enabled/000-default.conf

I have

> Options Indexes FollowSymLinks MultiViews

AllowOverride All

Order allow,deny

allow from all

Is that the wrong path?

I have also changed this file httpd.conf

> AllowOverride All

Thanks

2 Replies

What does the apache error log say?

There was no errors just the restarting of the server.

There was no forward slash in the directory address, not the first time I wasted time over a / and I guess won't be the last

 <directory var="" www="" html="" website_name.com="" public_html="">RewriteEngine On
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule . /index.php [L]
        Require all granted
        AllowOverride All</directory> 

What through me off is that this linewithout the forward slash is automatically generated.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct