Welcome Guest, Not a member yet? Register   Sign In
htaccess redirect www to non-www with codeigniter installed in a folder off the root
#1

[eluser]ehicks727[/eluser]
I've done this many times where I add a bit of code into the .htaccess file to force www.example.com to example.com. The problem I'm having now is that I have the application installed into a folder /products/ and my bit of code that normally works is not working now.

Here's my current .htaccess.

Code:
RewriteEngine on
RewriteCond $1 !^(index\.php|img|robots\.txt|css)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /products/index.php/$1 [L]
Options -Indexes
DirectoryIndex index.php

Does anyone have a solution for when the app is in a folder?? Thanks!




Theme © iAndrew 2016 - Forum software by © MyBB