php - symfony3 is using mysite.com/web instead of mysite.com -
hello i'm using symfony 3 new project. have deployed host. see project have go mysite.com/web instead of mysite.com
how can solve this? here goes .htaccess file
# use front controller index file. serves fallback solution when # every other rewrite/redirect fails (e.g. in aliased environment without # mod_rewrite). additionally, reduces matching process # start page (path "/") because otherwise apache apply rewriting rules # each configured directoryindex file (e.g. index.php, index.html, index.pl). directoryindex app.php # default, apache not evaluate symbolic links if did not enable # feature in server configuration. uncomment following line if # install assets symlinks or if experience problems related symlinks # when compiling less/sass/coffescript assets. # options followsymlinks # disabling multiviews prevents unwanted negotiation, e.g. "/app" should not resolve # front controller "/app.php" rewritten "/app.php/app". <ifmodule mod_negotiation.c> options -multiviews </ifmodule> <ifmodule mod_rewrite.c> rewriteengine on # determine rewritebase automatically , set environment variable. # if using apache aliases mass virtual hosting or installed # project in subdirectory, base path prepended allow proper # resolution of app.php file , redirect correct uri. # work in environments without path prefix well, providing safe, one-size # fits solution. not need in case, can comment # following 2 lines eliminate overhead. rewritecond %{request_uri}::$1 ^(/.+)/(.*)::\2$ rewriterule ^(.*) - [e=base:%1] # sets http_authorization header removed apache rewritecond %{http:authorization} . rewriterule ^ - [e=http_authorization:%{http:authorization}] # redirect uri without front controller prevent duplicate content # (with , without `/app.php`). redirect on initial # rewrite apache , not on subsequent cycles. otherwise # endless redirect loop (request -> rewrite front controller -> # redirect -> request -> ...). # in case "too many redirects" error or redirected # start page because apache not expose redirect_status # environment variable, have 2 choices: # - disable feature commenting following 2 lines or # - use apache >= 2.3.9 , replace l flags end flags , remove # following rewritecond (best solution) rewritecond %{env:redirect_status} ^$ rewriterule ^app\.php(?:/(.*)|$) %{env:base}/$1 [r=301,l] # if requested filename exists, serve it. # want let apache serve files , not directories. rewritecond %{request_filename} -f rewriterule ^ - [l] # rewrite other queries front controller. rewriterule ^ %{env:base}/app.php [l] </ifmodule> <ifmodule !mod_rewrite.c> <ifmodule mod_alias.c> # when mod_rewrite not available, instruct temporary redirect of # start page front controller explicitly website # , generated links can still used. redirectmatch 302 ^/$ /app.php/ # redirecttemp cannot used instead </ifmodule> </ifmodule>
i pointed domain public_html/web instead of public_html through cpanel
Comments
Post a Comment