Link From Subdomain to Root Domain Laravel 4.2
Date : March 29 2020, 07:55 AM
Hope this helps I have 1 subdomain in my app: admin.test.com and then the root is test.com. While in admin.test.com I want to send an email to a user to log in to test.com/login/aseqgaasd but right now it is sending the link to admin.test.com/login/aseqgaasd. , You could use named routes. For example, in your routes.php: Route::get('login/{param}', array('as' => 'TestLogin', 'uses' => 'HomeController@login'));
{{ URL::route('TestLogin', array('param' => $code)) }}
|
My Rails API endpoint takes a Host value, want to be able to get domain, subdomain
Date : March 29 2020, 07:55 AM
Hope that helps My controller action receives a hostname like: , Here you go: class UrlParser
include ActionDispatch::Http::URL
def initialize(url)
@_url = url
end
# Don't forget to override this method!
def raw_host_with_port
@_url
end
end
## Example usage:
url = UrlParser.new 'sub.example.com:8080'
url.subdomain # => 'sub'
url.domain # => 'example.com'
url.port # => '8080'
|
htaccess for domain and subdomain with laravel
Tag : php , By : Jakub Filak
Date : March 29 2020, 07:55 AM
I wish this helpful for you Maybe, you get a redirect loop, because the rule isn't protected by a condition. Although the default htaccess of Laravel should already contain them. RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
|
Laravel on subdomain - app.domain.com
Date : March 29 2020, 07:55 AM
|
Laravel 5 subdomain routing on any domain
Date : March 29 2020, 07:55 AM
|