- Assuming we want to move from /demo/foo/ to /demo/bar
- Copy /demo/foo/ to /demo/bar
- Make ESPECIALLY sure that the .htaccess file in foo has been copied to bar, because
cp
might not copy it in some cases. - Open the .htaccess file and change RewriteBase to /demo/bar.
- Change the last
RewriteRule
toRewriteRule . /demo/bar/index.php [L]
- Save & exit htaccess.
- You should now get a 404 page when you open the website.
- Go to your database and open wp_options table, you will find 2 rows containing the website url, change them accordingly.
- composer install, check your env, run key:generate, npm install, all that sh!t. (If you need the full steps comment below)
npm run prod
, that will build all Vue stuff and put them in the /public laravel folder- open your Vue router file and set the route base to the subdir (without public, with / at start and end, so if you're deploying to /demo/foo/, type "/demo/foo" as the base). 3.1. You can google how to set route base in vue
- go back to the Laravel folder, rename server.php to index.php
- copy css, js, assets, fonts, favicon.ico and .htaccess from public folder to root of Laravel project folder
- that's it, try accessing your site now
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
[...] | |
$user = $this->createUserIfNotExists($request); | |
Auth::login($user); | |
$token = $user->createToken("Personal Access Client")->accessToken; | |
if ($request->custom_content_url) { | |
return redirect()->away($request->custom_content_url."&username=".Auth::user()->username."&token=".$token); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from "react"; | |
import { createStackNavigator } from "react-navigation"; | |
import { createAppContainer } from 'react-navigation'; | |
import ContentWrappersScreen from "../features/mediaFeatures/contentWrapper/screens/ContentWrappersScreen"; | |
import MediaItemsScreen from "../features/mediaFeatures/mediaItem/screens/MediaItemsScreen"; | |
import MediaItemPdfScreen from "../features/mediaFeatures/mediaItem/screens/MediaItemPdfScreen"; | |
import MediaItemAudioScreen from "../features/mediaFeatures/mediaItem/screens/MediaItemAudioScreen"; | |
import MediaItemVideoScreen from "../features/mediaFeatures/mediaItem/screens/MediaItemVideoScreen"; | |
import MediaItemsFilterScreen from "../features/mediaFeatures/mediaItem/screens/MediaItemsFilterScreen"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
error_reporting(E_ALL); | |
$file = $_GET['file']; // a remote file url | |
$headers = array_change_key_case(get_headers($file, TRUE)); | |
$filesize = $headers['content-length']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import PropTypes from 'prop-types' | |
import React, { Component } from 'react' | |
import Flexbox from 'flexbox-react'; | |
import { connect } from 'react-redux'; | |
import { push, goBack } from 'react-router-redux'; | |
import './GetStarted.css'; | |
import Header from "../../../components/Header/Header"; | |
import ActionBar from '../../../components/ActionBar/ActionBar'; | |
import { Container, Button, Icon } from 'semantic-ui-react'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function blobUpload(Request $request){ | |
$pathresolver = new \FileUpload\PathResolver\Simple($_SERVER['DOCUMENT_ROOT'].env('temp_location')); | |
$filesystem = new \FileUpload\FileSystem\Simple(); | |
$fileupload = new \FileUpload\FileUpload(file_get_contents('php://input'), $_SERVER); | |
$filenamegenerator = new \FileUpload\FileNameGenerator\Random(5); | |
$fileupload->setPathResolver($pathresolver); | |
$fileupload->setFileSystem($filesystem); | |
$fileupload->setFileNameGenerator($filenamegenerator); | |
list($files, $headers) = $fileupload->processAll(); |