In this Tutorial, My Team is going to show and solving your problem related with index.php page URL in Codeigniter.
While Making the project we were suffering from this problem and searching for solution on other sites. but didn't found any solution regarding this problem But In the end I solved it. why it is not working on index.php and sub pages links not working without index.php page.
I had seen many articles those has written same code only copy paste one another and we were searching for solution on different site.
So Today, I am going to share you the exact code.
If your site is on root directory or on root than open your htaccess file and paste below code as it is written.
www.main site.com/yoursubfolder/
Now here you have to paste this below code into the .htaccess file in codeigniter website.
application/config/config.php
or you can mail us at - estuffcode@gmail.com
Thanks,
While Making the project we were suffering from this problem and searching for solution on other sites. but didn't found any solution regarding this problem But In the end I solved it. why it is not working on index.php and sub pages links not working without index.php page.
I had seen many articles those has written same code only copy paste one another and we were searching for solution on different site.
So Today, I am going to share you the exact code.
If your site is on root directory or on root than open your htaccess file and paste below code as it is written.
Options +FollowSymLinks All -IndexesBut if your website is in the sub folder after the root like example: -
Options All -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
www.main site.com/yoursubfolder/
Now here you have to paste this below code into the .htaccess file in codeigniter website.
Options +FollowSymLinks All -IndexesAlong with this your have to perform some changes into your config.php file too.
Options All -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteBase /yoursitefolder
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
application/config/config.php
$config['index_page'] = '';If you still facing any problem then feel free to contact our Team.
$config['uri_protocol'] = 'REQUEST_URI';
or you can mail us at - estuffcode@gmail.com
Thanks,
0 comments:
Post a Comment