mod rewrite - fat free php in subdirectory, routes not workin -
i'm staging fatfree site, i'm having issue running in subdirectory
this htaccess:
rewriteengine on rewritebase /~site/ rewritecond %{request_filename} !-l rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule .* /~site/index.php [l,qsa]
and route i'm using
get /*/index=app->show_home
i'm having add /*
before rest of it, because script keeps including subfolder part of route.
this working, suppose, once update dns settings, site no longer have these , have update it.
is there setting can apply somewhere allow both scenarios work?
the basic required .htaccess goes this:
rewriteengine on rewritecond %{request_filename} !-l rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule .* index.php [l,qsa]
notice how:
- rewritebase not needed
- index.php located in same folder .htaccess
but when using mod_userdir, little more configuration required:
- set rewritebase explicitly (as did):
rewritebase /~myuser/
- in user directory apache configuration, make sure
followsymlinks
,allowoverride all
enabled. respectively allow~
link followed , .htaccess processed.
here's example of user directory apache configuration:
<directory "/users/myuser/sites/"> options followsymlinks allowoverride order allow,deny allow </directory>
to answer last question:
is there setting can apply somewhere allow both scenarios work?
the answer is: no, long you're serving website user directory. move website documentroot
, run smoothly.
Comments
Post a Comment