Newbie to fuelphp and trying to work on an inherited project from client.
Requirement:
Need to create a login page for admin
The page needs to show quarterly snapshots of the client's database
I am trying to run the site on my local IIS. However, the issue is that index.php is the only page working since obviously it is the default root. I would like to be able to browse the rest of the pages and create a new login page. When browsing to other pages I get error 404 unfortunately.
The .htaccess file is as follows (I am trying to uncomment lines as suggested to avoid 404 but to no avail) :
# Multiple Environment config, set this to development, staging or production # SetEnv FUEL_ENV production RewriteBase /btw/ <IfModule mod_rewrite.c> # Make sure directory listing is disabled Options +FollowSymLinks -Indexes RewriteEngine on # NOTICE: If you get a 404 play with combinations of the following commented out lines #AllowOverride All #RewriteBase /wherever/fuel/is # Restrict your site to only one domain # !important USE ONLY ONE OPTION # Option 1: To rewrite "www.domain.com -> domain.com" uncomment the following lines. #RewriteCond %{HTTPS} !=on #RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] #RewriteRule ^(.*)$ http://%1/$1 [R=301,L] # Option 2: To rewrite "domain.com -> www.domain.com" uncomment the following lines. #RewriteCond %{HTTPS} !=on #RewriteCond %{HTTP_HOST} !^www\..+$ [NC] #RewriteCond %{HTTP_HOST} (.+)$ [NC] #RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L] # Remove index.php from URL #RewriteCond %{HTTP:X-Requested-With}!^XMLHttpRequest$ #RewriteCond %{THE_REQUEST}^[^/]*/index\.php [NC] #RewriteRule ^index\.php(.*)$$1 [R=301,NS,L] # Send request via index.php (again, not if its a real file or folder) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # deal with php5-cgi first <IfModule mod_fcgid.c> RewriteRule ^(.*)$ index.php?/$1 [QSA,L] </IfModule> <IfModule !mod_fcgid.c> # for normal Apache installations <IfModule mod_php5.c> RewriteRule ^(.*)$ index.php/$1 [L] </IfModule> # for Apache FGCI installations # note '?' removed to prevent url appearing in Input::get() <IfModule !mod_php5.c> RewriteRule ^(.*)$ index.php/$1 [QSA,L] </IfModule> </IfModule>
IIS doesn't use .htaccess, that is a file for Apache. IIS uses the web.config file, a default one is included but you'll have to modify it for your specific setup to make the rewrites work.
Yes, the web.config file in the document root (which normally is your public folder) contains the IIS rewrite instructions.
config in general doesn't need any changes unless you're doing very weird stuff...;)
If you have a setup where public is not your document root (not advised), you need to tweak things as the file should be in the document root of your website. Some guidelines can be found in the docs.
Thank you for the guidance. I have successfully configured the site after much reading around importing rewrites and can finally complete the task at hand :)