Hi everyone
I need a little help with a .htaccess file and RewriteBase.
The app I'm trying to run is a php CodeIgnitor app, and the .htaccess looks like it has been coded so that the app will only have correct URLs if the index.php is kept at the server document root. The app author runs all his apps on virtual hosts, but I keep all my apps in subdirectories in my /Sites/ directory (running off the default OS X Apache 1.3). So I need to adjust my app .htaccess so that it takes the subdirectory in to account.
This is how it looks at the moment (when the app expects to be running straight from the document root, i.e. /Sites/index.php);
The app is located at /Sites/stampychan/index.php, so I was thinking I needed something like this (although, it doesn't seem to work);
I need a little help with a .htaccess file and RewriteBase.
The app I'm trying to run is a php CodeIgnitor app, and the .htaccess looks like it has been coded so that the app will only have correct URLs if the index.php is kept at the server document root. The app author runs all his apps on virtual hosts, but I keep all my apps in subdirectories in my /Sites/ directory (running off the default OS X Apache 1.3). So I need to adjust my app .htaccess so that it takes the subdirectory in to account.
This is how it looks at the moment (when the app expects to be running straight from the document root, i.e. /Sites/index.php);
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteBase /stampychan
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
Comment