I'm having a issue and i'm trying to understand if this is possible.
My website is redirecting all the requests from http to https from AppServiceProvider.
The problem is that the 404 page is redirecting to homepage and i get two 301 redirects as follows:
http://url.com/some_unexisting_page (301 to) > https://url.com/some_unexisting_page (301 to) > https://url.com (200)
So instead of displaying the 404 page at https://url.com/some_unexisting_page i'm doing another 301 redirect to homepage.
My questions is if its possible to skip the 2nd redirect and go from http://url.com/some_unexisting_page (301 to) -> https://url.com
Thanks
I am not familiar with Laravel. But the redirect in question is definitely possible using Apache redirect or using Netflix Zuul.
Related
facebook debugger error
I have a problem with laravel project. I have added the og tags in my page, but while submitting my URL the facebook or some other social media, the URL is redirecting to some other location. I don't know why its happening, please help me. its argent, note: sorry I am not good at English.
When accessing the url http://wannahelp.com/whapi/swap/sw1820104201114-pulser-150-for-sale-bangalure-sw1820104201114 I get a 302 to http://wannahelp.com/whapi and then a 301 to http://wannahelp.com/whapi/. The last one also happens if I browse http://wannahelp.com/whapi, I get a 301 to http://wannahelp.com/whapi/
Check why the first url is returning a 302. Maybe the advert is not public/enabled?
Hope this helps
I am trying to add url rewrites
My current URL http://some_domain.co.uk/category/page_name/
I am trying to keep existing site urls functioning with below URL
http://some_domain.co.uk/category/page_name.htm
Any help appreciated.
Thanks!
i would highly recommend keeping the current URL structure, it's cleaner, and maintainability will be easier.
If your worried about the SEO or the dead links after the new site goes live then how about doing 301 redirect instead?
Umbraco has a plugin that helps you do 301 redirect and keep track of all the 404 pages, and you can view the report and 301 redirect those 404 pages.
http://our.umbraco.org/projects/developer-tools/301-url-tracker
In the example above,
http://some_domain.co.uk/category/page_name.htm
will get redirected to
http://some_domain.co.uk/category/page_name/
In a typical DNS like GoDaddy and Yahoo, can a 301 redirect do this:
http://mysite.com/abc to http://www.mysite.com/abc
However it seems its not possible; Can the app in the otherdomain know the subfolder?
Update:
What I mean are those DNS redirects, specifically from naked domain to a www domain
Update:
I managed to forward the naked domain from http://mysite.com to http://www.mysite.com/index.html So can I get the requested subfolder through javascript in the index.html?
Or the re-direct loses the subfolder originally requested?
The HTTP 301 response is not handled by DNS. It's a response emitted by a web server to indicate to the browser that the requested resource has been moved permanently to a new location, and it includes a Location: header with the new URL
For example:
HTTP/1.1 301 Moved Permanently
Location: http://www.example.org/index.asp
As you see, the location header can contain contain any valid URL, including a folder name.
Setting this up is server dependent, but Apache's mod_rewrite is certainly capable of rewriting URLs and including the requested folder name in the response.
If you are on a LAMP stack box, you can use .htaccess to redirect. You can redirect any page on site1 to any page on site2.
Redirect 301 /old-page-name http://www.your-domain.com/new-page-name
note, this is not a DNS solution, but I think you might not be looking for a strictly DNS-related answer.
I'm setting up custom 404 redirects (.htaccess is not an option as I'm on IIS6), is there a way to do this and still keep the 'fancy' url in the address bar?
There is not such thing as "404 redirects". 4xx range means error.
In any case -- you can use ISAPI_Rewrite 3 which will bring mod_rewrite support via .htaccess to your IIS6 server. It has Light version which is free.
Im having problems with the Apache's redirect.
I triying to redirect a request for a image file , I tried to use the same sintax used for pages. but it doesn't work
I'm doing this:
Redirect 301 /images/hamb.jpg http://my-website/denny.png
When I say it doesn't work is because the result is a 404 error - I tried to redirect the request because the jpg file is no longer available. Other redirects works but are page redirects. There is no error in the url.
Thanks for your help
I check the url in my production site and it was wrong. THANKS
Conclusion:
Is the same rule to redirect a file in apache