• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to run version 4 in a subdirectory

I've searched for hours and found lots of suggestions, of which none worked because they all seem to be too old and don't address version 4's move of index.php to public.

Here's what I finally ended up with before I came here.  This is in my edit directory (http://example.com/edit.  I'm running it in a virtual system managed by virtualmin and the files are in ~/public_html.  Specifically ~/public_html/edit. 
~/public_html/edit$ ls -a
.   .gitignore  README.md  composer.json  license.txt       public  system
..  .htaccess   app        env            phpunit.xml.dist  spark   writable
Options +SymLinksifOwnerMatch

# RewriteEngine On
# Please do-not forget to change RewriteBase /YOUR-SUBFOLDER HERE
RewriteBase /edit

RewriteRule ^$ public/index.php [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)

RewriteRule ^(.*)$ public/index.php?/$1 [L]
I don't quite understand Apache directives.  This gets me to a 404 error when I visit http://example.com/edit

I know it can be done, I just can't do it.
Thanks for the help.

I did change the public/.htaccess file too:
RewriteBase /edit

Hi, take a look at this tutorial:

And instead of /public_html/ it should be /public_html/edit

And you need ../../ instead of ../ in your index.php file.

If it dosen't work, open up your .htaccess and only change "RewriteBase /edit", everything else should be left as is.

That works or at least it displays something reasonable. Now I just have to develop the site.

Thank you!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.