Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Commit

Permalink
Partial Fix for Directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Feb 8, 2017
1 parent 9b7a919 commit 88b29e5
Show file tree
Hide file tree
Showing 6 changed files with 112 additions and 100 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ APP_ENV=production
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=error
APP_URL=http://localhost:80

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
Expand Down
16 changes: 6 additions & 10 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,19 @@

RewriteEngine On

# Habbo Web Assets
RewriteRule ^habbo-web/(.*)$ public/habbo-web/$1 [L]

# Habbo-Imaging for Badge
RewriteRule ^habbo-imaging/badge/([^/]+) public/habbo-imaging/badge.php?badge=$1

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

# Assets Exceptions
RewriteCond %{REQUEST_URI} !^/habbo-web/
RewriteCond %{REQUEST_URI} !^/habbo-imaging/

RewriteRule ^.*$ index.php [L]

# Habbo Web Assets
RewriteRule ^habbo-web/(.*)$ public/habbo-web/$1 [L]

# Habbo-Imaging for Badge
RewriteRule ^habbo-imaging/badge/([^/]+) public/habbo-imaging/badge.php?badge=$1

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Expand Down
13 changes: 13 additions & 0 deletions config/chocolatey.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@

'url' => 'http://localhost:80/',

/*
|--------------------------------------------------------------------------
| Hotel Path
|--------------------------------------------------------------------------
|
| This is used when you're working in subdirectories.
| WARNING: This is not RECOMMENDED! Chocolatey NEED be INSTALLED on the DocumentRoot ('/')
| WARNING: This it's only a partial fix!
|
*/

'path' => '/',

/*
|--------------------------------------------------------------------------
| Hotel Maintenance
Expand Down
20 changes: 10 additions & 10 deletions public/habbo-web/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4076,24 +4076,24 @@ angular.module("payment.popup", ["config", "google.analytics", "notifier", "popu
}]).config(["$compileProvider", function (t) {
t.debugInfoEnabled(!e)
}]), angular.module("config", []).constant("CONFIG", {
apiUrl: "/api",
extraDataUrl: "/extradata",
shopUrl: "/shopapi",
apiUrl: window.chocolatey.url + "api",
extraDataUrl: window.chocolatey.url + "extradata",
shopUrl: window.chocolatey.url + "shopapi",
appStoreUrl: "https://itunes.apple.com/app/id794866182",
badgeUrl: "https://habboo-a.akamaihd.net/c_images/album1584",
googlePlayUrl: "https://play.google.com/store/apps/details?id=air.com.sulake.habboair",
habboWebAdsUrl: "/habbo-web-ads/",
habboWebLeaderboardsUrl: "/habbo-web-leaderboards/",
habboWebNewsUrl: "/habbo-web-news/en/production/",
habboWebPagesUrl: "/habbo-web-pages/production/",
habboWebAdsUrl: window.chocolatey.url + "habbo-web-ads/",
habboWebLeaderboardsUrl: "habbo-web-leaderboards/",
habboWebNewsUrl: window.chocolatey.url + "habbo-web-news/en/production/",
habboWebPagesUrl: window.chocolatey.url + "habbo-web-pages/production/",
imagingUrl: "https://www.habbo.de/habbo-imaging",
groupBadgeUrl: "/habbo-imaging",
groupBadgeUrl: window.chocolatey.url + "/habbo-imaging",
lang: "en",
hotel: "hhus",
localizationSite: "com",
minAge: parseInt("0", 10),
rpxLocale: "en",
rpxTokenUrl: "/api/public/authentication/rpx",
rpxTokenUrl: window.chocolatey.url + "api/public/authentication/rpx",
offerToroEnabled: "false",
twitterAccount: "@Habbo",
adyenPublicKey: "10001|DB119F7832E23CBEDA2A330D3C13310D78ABA07136CDFFFA3D798BDFE4A903D5A079EE09710BBEC72573F0CA80D48DD0380D8AC1B0FDBCB978E69E9BE92ABDC27020858A52DC8D7A9C2D77B071FE1E6A3177E4E73E8E7CFC4A13C881BBBEF3C2EFBB24475818AB9E56BC597BABFD306593C3DF2B16F49D38F560212C183492EE7D0750CE84AB3509563CB3C99EC0B815CF5211E793500110B2A53DCAD793E267677BBE89035E5E9662FD2DB94A5EECBD6FB81F5DAF7205F9EBF15963639FC72DF0875CC2249FB31B300CC8183B2C948B3B3843C414677C9EC82C6A2D4CBF937B57FD03A53B0A8A56369AD490CEAB9EED18FE77E7B9032445A57A06CE23DE6115"
Expand All @@ -4105,7 +4105,7 @@ angular.module("payment.popup", ["config", "google.analytics", "notifier", "popu
e.setLanguage("en"), e.setSiteKey(window.chocolatey.captcha)
}]), angular.module("pascalprecht.translate").config(["$translateProvider", function (e) {
e.preferredLanguage("com"), e.useStaticFilesLoader({
prefix: "/habbo-web-l10n/",
prefix: window.chocolatey.url + "habbo-web-l10n/",
suffix: ".json"
}), e.useSanitizeValueStrategy("escapeParameters")
}])
Expand Down
2 changes: 1 addition & 1 deletion resources/views/habbo-web.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
window.geoLocation = {!! json_encode((object)$chocolatey['location']) !!};
window.partnerCodeInfo = null;
window.banner = null;
window.chocolatey = {captcha: '{{$chocolatey['recaptcha']}}', facebook: '{{$chocolatey['facebook']['app']['key']}}'};
window.chocolatey = {captcha: '{{$chocolatey['recaptcha']}}', facebook: '{{$chocolatey['facebook']['app']['key']}}', url: '{{$chocolatey['url']}}', base: '{{$chocolatey['path']}}'};
</script>
</head>
<body habbo-client-disable-scrollbars ng-cloak>
Expand Down
Loading

0 comments on commit 88b29e5

Please sign in to comment.