My url is www.exam.domain.ac.in. exam is the sub domain. I want to remove the www and also index.php from my codeigniter application.
And is it possible to remove the www with php code without using .htaccess?
Please someone help me.
My url is www.exam.domain.ac.in. exam is the sub domain. I want to remove the www and also index.php from my codeigniter application.
And is it possible to remove the www with php code without using .htaccess?
Please someone help me.
First of all you need to create .htaccess file in your root folder and then paste following code so it will work.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ index.php?p=home [S=1]
RewriteRule ^/$ index.php?p=home [S=1]
</IfModule>
First of all you need to create a file with .htaccess file and then paste the following code.
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>