I am running Domain and IP on one server, also installed SSL on domain, now htaccess not working for IP

August 30, 2016 120 views
Apache Ubuntu

Hi, I have one Ip, i mapped domain, and Installed SSL (let's encrypt). Now main domain is working on https. but IP working on HTTP.

every thing is working fine, but my CodeIngiter htaccess not working.

RewriteEngine On

RewriteCond %{REQUESTFILENAME} !-f
RewriteCond %{REQUEST
RewriteRule ^(.*)$ index.php?/$1 [L]

I am using virtual host. and using Alias.

What are possible problems?

I have checked Apache error log.
error.log showing bellow erorrs.

AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.16 OpenSSL/1.0.1f configured -- resuming normal operations

AH00094: Command line: '/usr/sbin/apache2'

Please help me.


2 Answers

I would check that your newly created https virtualhost configuration incldues AllowOverride All as an option. Without this the default may not allow the rules in your .htaccess file to be used.

  • So what i do in http virtual host? I need to change in https or http virtual host? or in .htacccess file?

    because other applications are working fine.

Have another answer? Share your knowledge.