Welcome Guest, Not a member yet? Register   Sign In
Remove index.php? from URL with question mark | Codeigniter
#1

(This post was last modified: 07-16-2021, 07:28 AM by MTR2021.)

Hi Dear codeignite forum Community i am newbie in Codeignite coding so i hope you guys give me the time to fix this error thanks is advance Smile
So basically i followed a tutorial here and i disabled index.php from URL that problem was fixed but i still have the remaining question mark ? i tried every tutorial here in codeignite forum eventually i manage to remove the index.php but the question mark remains so how to remove index.php? and finally have example.com/index.php?/signin to example.com/signin without index.php and ? mark
here is my htaccess folder
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

RewriteCond %{QUERY_STRING} ^(.*)i=[^&]+(.*)$ [NC]
RewriteRule ^(.*)$ /$1?%1%2 [R=301,L]
</IfModule>
AddType text/vtt .vtt
Reply
#2

Please someone help me admin or somebody i have not been answered for 2 days now Sad
Reply
#3

@MTR2021 I’m sorry you haven’t had a response yet. I e read all your messages, but I am not a pro with Apache so don’t have an immediate suggestion.

You might try moving your thread to the Support forum, which is more appropriate for help requests.
Reply
#4

please use default .htaccess from CI4.

replace this line:
RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA]

with this line:
RewriteRule ^(.*)$ index.php?/$1 [L,QSA]

Then,set:
App -> Config -> App.php :

public $indexPage = ''; //'index.php';

This is working for me.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB