Search Posts

Category: apache

angular .htaccess 404 for html5mode

I am trying to make my urls looks like localhost/CLCAppV2/client/register rather than looking like ocalhost/CLCAppV2/client/index.html#/register So I configured my .htaccess like <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*) index.html/$1 </IfModule> I then configured my angular config to look like $urlMatcherFactoryProvider.caseInsensitive(true); $locationProvider.hashPrefix(”); $urlRouterProvider.otherwise(‘/register’); $locationProvider.html5Mode({ enabled: true, requireBase: true }); I also have my html base url set in the index.html as <base href=”/CLCAppV2/client/”> My current folder structure looks like […]

Angular and symfony in one dir – htaccess

I have following problem, I have in folder /var/www/html 2 dirs: app (angular application) and api(restful api and cms written in symfony3). In both directories there is appropriate htaccess for each application. The document root is /var/www/html and I need the website to be redirected to app/index.html, and only /api/ to api subfolder. But I can’t get this working with symfony htaccess. Angular htaccess is default provided. Symfony htaccess: DirectoryIndex app.php <IfModule mod_rewrite.c> RewriteEngine On […]