Welcome Guest, Not a member yet? Register   Sign In
htaccess error
#1

Hey guys, i'm new here, so please take it easy on me  Wink

I've been running a CodeIgniter 3 project on Xampp for a while (on Arch Linux, I believe it matters in my problem).
It worked great; I had my files outside of the default Xampp directory but linked the root of the site to a folder in the Xampp root.
This way I could go to my site by using "localhost/linkname".

For reasons I decided to change this, I now have Xampp set up with a virtualhost, pointing to the original directory of my project.
Now I can go to my site by using "fcs.local". It properly shows the homepage.

Now I have .htaccess set up so it removes index.php from the url (the usual stuff I know, but I couldn't find anyone else with this problem). With the first set up it worked great, the index.php was gone from the url.
But now in this new set up it doesn't seem to work anymore. I have to typ "fcs.local/index.php/controller/view" for every page now.
The thing is, it works properly on Windows, with the same htaccess file, virtualhost and project.

.htaccess (located in the root of my project):
Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|assets|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

Virtualhost:
Code:
<VirtualHost fcs.local:80>
    DocumentRoot    "/home/****/Documents/GoogleDrive/Programming/Web/FCS-Site/website"
    ServerName    fcs.local
    <Directory "/home/****/Documents/GoogleDrive/Programming/Web/FCS-Site/website">
        Require all granted
    </Directory>
</VirtualHost>

What can I do to make this work again, and why does it work properly on Windows?
Reply
#2

Never mind, while waiting for this post to be approved I fixed it myself by intense Googling.
I had to change every "AllowOverride" in httpd.conf to All.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB