.htaccess - CodeIgniter removing index.php from base url -


I am working with CodeIgniter under the LAMPP stack.

I have the following set as my baseurl

  http://example.com/subfolder  

this is my folder Structure is

  root | | Ci_engine public_html | | ---- subfolder | | | | | | ------ Application, index.php, .htaccess public_fpt | | Other_stuff  

The following is my .htaccess

  & lt; IfModule mod_rewrite.c & gt; RewriteBase on RewriteEngine removes / # users access to system folders. #Additionally this will allow you to create a System.php controller, #previously it is not possible. # 'System' can be changed if you have changed the name of your system folder. RewriteCond% {REQUEST_URI} ^ System * RewriteRule ^ (. *) $ /index.php?/$1 [L] # When your application folder is not in the system folder #This snippet # prevents user folder from blocking application folder by: Fabdrol #Rename 'application' For your application folder name. RewriteCond% {REQUEST_URI} ^ App * RewriteRule ^ (. *) $ /index.php?/$1 [L] # To check that the user is trying to access a valid file, image or as a CSS document # if this is not true, then It sends #request for index.php, revoked% {REQUEST_FILENAME}! -f rewrite code% {REQUEST_FILENAME}! -d Recruitment rule ^ (. *) $ Index.php? / $ 1 [L] & lt; / IfModule & gt; & Lt; IfModule! Mod_rewrite.c & gt; # If we do not have mod_rewrite installed, all 404 can be sent to # index.php, and everything works as normal. # Submitted by: ElliotHaughin ErrorDocument 404 /index.php & lt; / IfModule & gt;  

If I type http://example.com/subfolder/controller/function

, then if I type < Code> http: / /example.com/subfolder/index.php?/controller/function & lt; & Lt;

I get a 404 error.

How should I fix this? Text "itemprop =" text ">

HTACS

  option for you + follow-up option option -index rewriting engineer / revarked% {REQUEST_FILENAME}! -FREVRATICOND% {REQUEST_FILENAME}! - D RewriteCond $ 1! ^ (Index \ .php) RewriteRule ^ (. *) $ / Endex.php/$1 [L]  

and set

 <  'config_page'] = '';  / Code> 

Use enable your mod rewrite to enable the Sudo A2 memo rewrite & Sudo service apache2 restart If it is not enabled for UDP (Ubuntu).

Option -index is optional (just to avoid listing directory)


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -