Note the upgraded forum! If you are experiencing issues logging in, you may need to reset your password which should send an email. If the email doesn't arrive, be sure to check your spam folder just in case.

Deployment to Production htaccess issues

edited September 2017 in Installation
Hi,

I tried pushing the fuel repo to the client server and I am able to access only the home page of the application i.e., the main url of the application apart from it none of the internal URLs are accessible and gives 404.

Here is my htaccess code, re-write is enabled on the apache2 server. The code is deployed on /var/www/html folder using the default host created by apache.

Options +FollowSymLinks


RewriteEngine On
RewriteBase /


Order Deny,Allow
Deny From All


# Allow asset folders through
RewriteRule ^(fuel/modules/(.+)?/assets/(.+)) - [L]

# Protect application and system files from being viewed
RewriteRule ^(fuel/install/.+|fuel/crons/.+|fuel/data_backup/.+|fuel/codeigniter/.+|fuel/modules/.+|fuel/application/.+) - [F,L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule .* index.php?/$0 [L]
#RewriteRule ^(.*)$ /index.php/$1 [L] # tried some variations here, but couldnt get through

# Prevents access to dot files (.git, .htaccess) - security.
RewriteCond %{SCRIPT_FILENAME} -d
RewriteCond %{SCRIPT_FILENAME} -f
RewriteRule "(^|/)\." - [F]


Options -Indexes
Here is the apache config, the very basic one.


# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
#ServerName www.example.com

ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf


Comments

Sign In or Register to comment.