@@ -47,6 +47,79 @@ Php version required >= 5.5, <= 7.2 (this limitation will be removed in the futu
4747
4848You will need the CMS Connect URL to complete the [ VueFront Web App installation] ( https://vuefront.com/guide/setup.html )
4949
50+ ## Deploy VueFront Web App to hosting (static website)
51+ ### via VueFront Deploy service (recommended)
52+ 1 . Install the VueFront CMS Connect App from this repo.
53+ 2 . Log in or register an account with VueFront.com
54+ 3 . Build your first Web App
55+ 4 . Activate the new Frontend Web App (only avalible for Apache servers)
56+ > For Nginx you need to add this code to your ` nginx.config ` file right after the ` index ` directive
57+ ```
58+ location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
59+ try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
60+ }
61+ ```
62+
63+
64+ ### via ftp manually
65+ 1 . Install the VueFront CMS Connect App from this repo.
66+ 2 . Log in or register an account with VueFront.com
67+ 3 . Copy the CMS Connect URL
68+ 4 . Via Ftp create a new folder ` vuefront ` in the root of your PrestaShop site on your hosting.
69+ 5 . Via command line build your VueFront Web App ([ read more] ( https://vuefront.com/guide/setup.html ) )
70+ ```
71+ yarn create vuefront-app
72+ # When promote, provide the CMS Connect URL, which you coppied at step 3.
73+ yarn generate
74+ ```
75+ 6 . Copy all files from folder ` dist ` to the newly created ` vuefront ` folder
76+ 7 . modify you ` .htaccess ` file by adding after ` RewriteBase ` rule the following rules:
77+ ``` htaccess
78+ # VueFront scripts, styles and images
79+ RewriteCond %{REQUEST_URI} .*(_nuxt)
80+ RewriteCond %{REQUEST_URI} !.*/vuefront/_nuxt
81+ RewriteRule ^([^?]*) vuefront/$1
82+ # VueFront sw.js
83+ RewriteCond %{REQUEST_URI} .*(sw.js)
84+ RewriteCond %{REQUEST_URI} !.*/vuefront/sw.js
85+ RewriteRule ^([^?]*) vuefront/$1
86+ # VueFront favicon.ico
87+ RewriteCond %{REQUEST_URI} .*(favicon.ico)
88+ RewriteCond %{REQUEST_URI} !.*/vuefront/favicon.ico
89+ RewriteRule ^([^?]*) vuefront/$1
90+ # VueFront pages
91+ # VueFront home page
92+ RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
93+ RewriteCond %{QUERY_STRING} !.*(rest_route)
94+ RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html -f
95+ RewriteRule ^$ vuefront/index.html [L]
96+ RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
97+ RewriteCond %{QUERY_STRING} !.*(rest_route)
98+ RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/index.html !-f
99+ RewriteRule ^$ vuefront/200.html [L]
100+ # VueFront page if exists html file
101+ RewriteCond %{REQUEST_FILENAME} !-f
102+ RewriteCond %{REQUEST_FILENAME} !-d
103+ RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
104+ RewriteCond %{QUERY_STRING} !.*(rest_route)
105+ RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html -f
106+ RewriteRule ^([^?]*) vuefront/$1.html [L,QSA]
107+ # VueFront page if not exists html file
108+ RewriteCond %{REQUEST_FILENAME} !-f
109+ RewriteCond %{REQUEST_FILENAME} !-d
110+ RewriteCond %{REQUEST_URI} !.*(image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/)
111+ RewriteCond %{QUERY_STRING} !.*(rest_route)
112+ RewriteCond %{DOCUMENT_ROOT}".$document_path."vuefront/$1.html !-f
113+ RewriteRule ^([^?]*) vuefront/200.html [L,QSA]
114+ ```
115+
116+ > For Nginx you need to add this code to your nginx.config file right after the index rule
117+ ```
118+ location ~ ^((?!image|.php|admin|catalog|\/img\/.*\/|wp-json|wp-admin|wp-content|checkout|rest|static|order|themes\/|modules\/|js\/|\/vuefront\/).)*$ {
119+ try_files /vuefront/$uri /vuefront/$uri "/vuefront${uri}index.html" /vuefront$uri.html /vuefront/200.html;
120+ }
121+ ```
122+
50123## Support
51124For support please contact us at [ Discord] ( https://discord.gg/C9vcTCQ )
52125
0 commit comments