Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Your problem is with the two <code>.htaccess</code> files your are using. When using <code>.htaccess</code> it will use the file that is closest to the requested folder. In your case you have the following folder structure</p> <pre><code>- public_html - B1 - .htaccess //from codeigniter project .htaccess //your own with redirect </code></pre> <p>So when you call the url <code>mydomain.com/b1/controller/function</code> the closest <code>.htaccess</code> it can find is the codeigniter one, so it will use this one. Your own file will not be used. In other words your redirect rules are never even evaluated.</p> <p>Now if you call <code>mydomain.com/controller/function</code> the closest <code>.htaccess</code>, is your own and the request is redirected to <code>mydomain.com/b1/controller/function</code> as expected. There it will again try to find the closest <code>.htaccess</code> which is the codeigniter one and thus the request works.</p> <p>There are two things you can do. The first and best thing is to remove your <code>.htaccess</code> and copy all files and folders from the <code>b1</code> folder back to your <code>public_html</code> folder and then simply remove the <code>b1</code> folder. This way your server doesnt even have a <code>b1</code> folder and everything will work as expected.</p> <p>The second option would be to combine the two <code>.htaccess</code> files and keep them in your <code>public_html</code> folder. Make sure you delete the one in the <code>b1</code> folder. The file would look something like</p> <pre><code>RewriteEngine on RewriteRule ^b1/(.*)$ /$1 [R=301,L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ b1/index.php/$1 [L] </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload