skip to Main Content

.htaccess redirects too many times – Apache

I have written a .htaccess for the subdomain but it redirects too many times. my complete code looks like RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ http://subdomain/$1 [R,L] RewriteEngine On RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$…

VIEW QUESTION

SED pattern matching – Nginx

I am trying to modify NGINX config file using sed. I wand to replace the values of ssl_certificate and ssl_certificate_key config="/etc/nginx/httpd.conf" certfile="server.pem" keyfile="key.pem" sed -i -e "s/(ssl_certificate */etc/pki/nginx/).*/1$certfile/" $config sed -i -e "s/(ssl_certificate_key */etc/pki/nginx/private/).*/1$keyfile/" $config With the starting lines that…

VIEW QUESTION

Apache Allow Mentioned Query String ReturnURL

I've a requirement wherein I wanted to allow only configured return url. Remaining ones should be routed to error message 403. Currently the apache code i've tried is as shown below. RewriteCond %{QUERY_STRING} (returnURL|[&]returnURL)=(http|https)://(my[.]return[.]site[.]com)[&]{0,1} RewriteRule ^(.*) / [R=403,L] With this…

VIEW QUESTION

Redis – How to properly use regex to search from a command's output in Bash?

I have a command lando info which has a fairly large multi-line output: [ { service: 'appserver', urls: [ 'https://localhost:52836', 'http://localhost:52837', 'http://if-build-d9.lndo.site/', 'https://if-build-d9.lndo.site/' ], type: 'php', healthy: true, via: 'apache', webroot: './web', config: { php: '/Users/runo/.lando/config/drupal9/php.ini' }, version: '7.3', meUser:…

VIEW QUESTION
Back To Top
Search