I have looked on a few Stack Overflow questions for removing index.php from sub domain url please don't mark as duplicate.
Stack Overflow I have Read And Tried.
CodeIgniter in subdomain folder, removing the index.php from address
remove index.php of codeigniter subdomains
Removing index.php and handling subdomains of two Codeigniter sites, when one within the other
But non seem to work I am using WAMP and Codeigniter 3 and have MOD Rewrite enabled. Also I use virtual host.
Question: What is the best suitable htacces for sub domain so that I can have the index.php remove?
Page Error:
codeigniter 500 internal server error My Folder Structure is
www / www / codeigniter / cms-1 <-- This is main project www / codeigniter / cms-1 / application www / codeigniter / cms-1 / cms-2 <-- This is sub domain www / codeigniter / cms-1 / cms-2 / index.php www / codeigniter / cms-1 / cms-2 / .htaccess www / codeigniter / cms-1 / image / www / codeigniter / cms-1 / system www / codeigniter / cms-1 / .htaccess www / codeigniter / cms-1 / index.php When I have URL on WAMP like below does not work.
http://www.cms-2.cms-1.com/information/information/3
But when I have index.php works.
http://www.cms-2.cms-1.com/index.php/information/information/3
I have removed on the application > config > config.php
$config['index_page'] = ''; This .htaccess below is on Main directory and works fine for main domain.
Options +FollowSymLinks # Prevent Directoy listing Options -Indexes # Prevent Direct Access to files <FilesMatch "(?i)((\.tpl|\.ini|\.log|(?<!robots)\.txt))"> Order deny,allow Deny from all </FilesMatch> DirectoryIndex index.php RewriteEngine on RewriteCond $1 !^(index\.php|images|robots\.txt) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?$1 [L,QSA]