w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
(SOLVED) lighttpd, redirect just the IP to https and a specific port?
So, is this solved or not? By specifying 101.102.103.104 your browser defaults to port 80. So, if lighttpd is listening on port 80, you can capture/redirect using the same technique you described. In the configuration documentation it says that the daemon will bind to ports specified in $SERVER["socket"] == conditionals. e.g. $SERVER["socket"] == ":80" { $HTTP["host"] =~ "([^:/]+)" { url.redirect = ( "^/(.*)" => "https://%1:8000/$1" ) } } The above config should guarantee lighttpd will have bound to port 80 and will also make redirects to port 8000.

Categories : Misc

Redirect specific get variable to other folder. htaccess
You can limit a RewriteRule based on the content of the QUERY_STRING (the bit after the ?). You can do this with a RewriteCond such as the following: RewriteCond %{QUERY_STRING} unsubscribe= RewriteRule ^$ /newsletter/ [QSA,R] The RewriteCond matches any QUERY_STRING that contains "unsubscribe=". Then the RewriteRule will rewrite any empty request to point to "/newsletter/", and append the query string to it. Rewriting only an empty request means that requests in subdirectories will not be redirected. For example http://example.com/?unsubscribe=12345 -> http://example.com/newsletter/?unsubscribe=12345 http://example.com/test/?unsubscribe=12345 : no redirect If you wish to also redirect requests for subdirectories, then replace the rule with the following: RewriteCond %{QUERY_

Categories : Htaccess

Avoiding Wordpress .htaccess rules on specific folder
You don't need multiple .htaccess you can put all the rules on the WordPress main .htaccess: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !^folder RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress Use either: RewriteRule ^folder/start.php$ /folder/index.php [R=301,L,NC] Or Redirect 301 /folder/start.php http://www.domain.com/folder/index.php Don't forget to change folder to your actual folder name.

Categories : Wordpress

Redirect all http AND https non-www URLS to https://www.xyz.com via htaccess
In case anyone from the future (HELLO PEOPLE OF THE FUTURE) stumble across this, I asked the same question and had it answered over at Server Fault. Short version: impossible. Long version: http://serverfault.com/questions/523199/redirect-all-http-and-https-non-www-urls-to-https-www-example-com-via-htaccess

Categories : Htaccess

IHttpHandler to redirect "https://example.com" to "https://www.example.com"?
If you use IIS7, you might want to try URL Rewrite Module. http://www.4guysfromrolla.com/articles/072810-1.aspx http://www.jppinto.com/2010/03/automatically-redirect-http-requests-to-https-on-iis7-using-url-rewrite-2-0/

Categories : Asp Net

Mvc action link redirect to folder within view folder
I'm still not quite sure what your setup is, but for the general case of linking to a view that is included in a subfolder of the Views folder. Link to your controller action that handles the view, not the view itself @Html.ActionLink("Report", "Report", "Reports", null, new { target = "_blank" }); First parameter is just the link text, followed by the action, then the controller (not the view), no route parameters, and your HTML attributes. The Report action on the Reports controller is going to look for a Views/Reports/Report.cshtml file. Since this does not exist, you can pass in a string parameter to the View() method to specify which view you're actually using. public ActionResult Report() { // Do your controller work return View("PhoneCalls/Report"); }

Categories : Asp Net Mvc

How to redirect from url: https://myfavourite.test.com/Account/LogOn?ReturnUrl=/ to url: https://myfavourite.test.com/ using IIS7.5
I followed the steps mentioned in the below mentioned article and it helped me. http://www.trainsignal.com/blog/iis7-url-rewrite-extension-on-windows-server-2008 I used the Redirect option and then added a Blank rule with the following regular expression: account$|account/(?!LogOff) and that helped me to resolve the redirection issue.

Categories : Asp Net Mvc

How do i redirect a non-existent folder to similar folder?
Will this work? Put this in the .htaccess file. Untested Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^/]+) /#!/home/$1 [R=301,NC,L]

Categories : Htaccess

HTTPS only for certain folder
RewriteCond %{HTTPS} on RewriteCond %{REQUEST_URI} !^/xcart/.* RewriteRule (.*) http://%{HTTP_HOST}/$1 [R,L] RewriteCond %{HTTPS} off RewriteCond %{REQUEST_URI} ^/xcart/.* RewriteRule (.*) https://%{HTTP_HOST}/$1 [R,L]

Categories : Htaccess

Redirect HTTPS to HTTP and NON WWW to WWW
You can combine: RewriteCond %{HTTPS} on RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} and RewriteCond %{HTTP_HOST} ^ties.co.uk$ RewriteRule (.*) http://www.ties.co.uk/$1 [R=301,L] into a single rule that needs to be right below RewriteEngine On: RewriteCond %{HTTPS} on [OR] RewriteCond %{HTTP_HOST} ^ties.co.uk$ [NC] RewriteRUle ^(.*)$ http://www.ties.co.uk/$1 [R=301,L]

Categories : Apache

SSL offloading redirect to https
You just send a normal redirect to the client. The response will be the sent out using the original http request and the new https request will terminate SSL at the load balancer as per normal.

Categories : Asp Net

How to https a folder in Apache?
Added this in .htaccess within the folder to be encrypted: RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} SugarCRM RewriteRule ^(.*)$ https://mysite.com/SugarCRM/$1 [R,L]

Categories : PHP

How to monitor specific folder and save content of each log file in that folder to mysql database
First of all, congratulations! You are in front of a beautiful problem. My suggestion is to use divide and conquer. Here are my considerations: Put the relevant folder(s) under version control (for example, GIT) Check via GIT commands the files that changed every X amount of time. Also obtain the differences between the prior version of each file, and the new ones, so you can update your database parsing the new info. Just in case, here are ways to call system commands from ruby. Hope that helps,

Categories : Mysql

Redirect all images to its corresponding https site
Of course it loops - because the pattern matches for requests for the HTTPS versions as well (since only the url path component is checked). Add a RewriteCond that checks if the request came in via HTTPS.

Categories : Image

using Mod_rewrite to redirect HTTP to HTTPS
are you trying it on localhost or on a live server? Redirect http to https (SSL for entire website) try this in .httaccess RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} or RewriteCond %{SERVER_PORT}s ^(443(s)|[0-9]+s)$ RewriteRule ^(.*)$ - [env=askapache:%2] # redirect urls with index.html to folder RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /([^/]+/)*index.html HTTP/ RewriteRule ^(([^/]+/)*)index.html$ http%{ENV:askapache}://%{HTTP_HOST}/$1 [R=301,L] # change // to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9} /(.*)//(.*) HTTP/ [NC] RewriteRule ^.*$ http%{ENV:askapache}://%{HTTP_HOST}/%1/%2 [R=301,L]

Categories : Apache

Redirect to HTTP non-www to HTTPS www htaccess
Try it like this: RewriteEngine On RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301] The only real difference here is that first we redirect from non-WWW to WWW then we check for HTTPS and redirect it. If it does work then try this one: RewriteEngine On RewriteCond %{HTTP_HOST} !^www. [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)$ https://www.domain.com/$1 [L,R=301]

Categories : Htaccess

Redirect a website from http to https
This solution helped me. <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://domain.name/$1 [R,L] </IfModule> I hope it'll be helpfull for you too.

Categories : Apache

Redirect website from http to https
I can see that you've taken the code snipet from Steve Marx example The problem is that you have whitespace in your rule name. Just remove them and it will work. The name attribute of rule must not have spaces; the rule won’t work correctly in IIS on Azure with spaces in the name. Find the full article here: Azure https guide

Categories : C#

In Pyramid how can I redirect from http to https?
Some unsolicited advice - Don't redirect to SSL from non-SSL. There's a security issue. Basically, if someone manages to Man-In-The-Middle your non-SSL'd service, they could redirect it to an SSL service running with a valid certificate on a different server - the user might not notice this. It's better to provide a page that warns the user and provides a plain-text link for them to click.

Categories : Python

Redirect using HTTPS connection Response
Could you provide your connection code? As a generic approach,you can set the setInstanceFollowRedirect(false) for the HttpUrlConnection, so that the redirects don't go through and you can handle them manually. Here is a good example: http://www.mkyong.com/java/java-httpurlconnection-follow-redirect-example/

Categories : Java

.htaccess redirect from old folder name to new folder name
Try changing your rule to: RewriteRule ^home/(.*) profile/$1 [L,R=301] Adding the [L,R=301] flags in the rule makes it so the request gets redirected instead of internally rewritten.

Categories : Htaccess

Redirect http to https via .htaccess not working
Amie if you want to force www and https both you can check for the absence of www. or check if https is not On then redirect. So either way it will redirect. example. # Primary Domain - Force the use of "https" and www RewriteCond %{HTTP_HOST} !^www. [OR] RewriteCond %{HTTPS} !^on$ RewriteRule ^(.*)$ https://www.mydomain.org/$1 [R=301,L] Replace mydomain.org with your domain. Then you can have a htaccess file like this. I took the last two rules and combined them so you have a smaller htaccess file. # enable basic rewriting RewriteEngine on # enable symbolic links Options +FollowSymLinks # Primary Domain - Force the use of "https" and www RewriteCond %{HTTP_HOST} !^www. [OR] RewriteCond %{HTTPS} !^on$ RewriteRule ^(.*)$ https://www.mydomain.org/$1 [R=301,L] # Primary Domain - .c

Categories : Apache

not able to redirect HTTP to HTTPS using rewrite in htaccess
Enable mod_rewrite and .htaccess through httpd.conf and then put this code in your .htaccess under DOCUMENT_ROOT directory: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] Tip: Clear your browser cache or use a different browser to test.

Categories : Regex

Redirect HTTP and HTTPS properly in htaccess
You aren't checking whether the incoming request is HTTPS or not. You can combine the two with a bit of clever regex grouping: <ifModule mod_rewrite.c> RewriteEngine On RewriteCond %{HTTP_HOST} ^www2.mydomain.com$ [NC] RewriteCond %{HTTPS}:s (on:(s)|off:s) RewriteRule ^(.*)$ http%2://newmydomain.com/$1 [L,R=301] </ifModule> There isn't an %{HTTPS_HOST} variable, as it's the "Host:" request field. All the %{HTTP_(something)} variables are request fields, e.g. %{HTTP_USER_AGENT}, %{HTTP_COOKIE}, %{HTTP_REFERER}, are all request fields; User-Agent:, Cookie:, Referer:. The second condition checks if the request is HTTPS or not, and if so (on), it captures the "s" which is backreferenced by %2, thus turning the redirect to https://, otherwise, just http://.

Categories : Apache

How To Setup A 301 redirect from an http to https in iis7
There are 3 ways to go. Look at http://blogs.msdn.com/b/kaushal/archive/2013/05/23/http-to-https-redirects-on-iis-7-x-and-higher.aspx

Categories : Http

Redirect all https to http, except 3 pages [htaccess / php]
Give this plugin a go: http://wordpress.org/plugins/wordpress-https I personally use it all of the time. You can make every page https or can go into individual pages/posts and just make those individually secure. EDIT RewriteEngine on RewriteCond %{SERVER_PORT} =80 RewriteRule ^bookingstep1/?$ https://URL HERE/bookingstep1[R=301,QSA,L,NE] RewriteRule ^bookingstep2/?$ https://URL HERE/bookingstep2[R=301,QSA,L,NE] RewriteRule ^bookingstep3/?$ https://URL HERE/bookingstep3[R=301,QSA,L,NE]

Categories : Wordpress

tomcat doesn't redirect http to https
I dare to claim that this is unrelated to tomcat - or how else does a cgi-script come into play? In case you've configured this yourself, look at the redirect.cgi script. It probably tries to determine the server's name. If you're using Apache httpd, this can typically be configured, otherwise apache defaults to the server's IP address as a name. In this case, Apache typically complains about the missing server name when starting up. Maybe related: The only place where I found (after a quick search) this redirect.cgi and arip parameter used, was in a ZyXel device - if you're using this one to redirect, that's what you need to configure. You might get more clues about the actual server by inspecting the HTTP response headers, e.g. with Firebug or a similar tool.

Categories : Tomcat

Redirect entire pages on http to https in magento
It depends on the page you want to make secure. By default Magento redirects to secure only some pages. The ones that required user information (register, login, checkout, contact). If you want to add a custom page read the answers in this question maybe they help. If you want all the pages to be on https (even if I don't see a point in this) you can set, like you did, the unsecure url in config to https://www.xyz.com. and under the same config section (Web) under Url Options set Auto-redirect to Base URL to No. Clear the cache and give it an other try.

Categories : PHP

Change CakePHP default redirect from HTTP to HTTPS?
You can use SecurityComponent::requireSecure (See) to force SSL for all actions, but as said before SSL should be enabled / supported on/by your webserver. It seems to me that this is not really a CakePHP problem.

Categories : PHP

Redirect HTTP to HTTPS in Spring Security or Tomcat
I configured the redirection from HTTP(port 80) to HTTPS(port 443) within server.xml as <Connector connectionTimeout="20000" port="80" protocol="HTTP/1.1" redirectPort="443"/>

Categories : Tomcat

How to correctly redirect a URL which does NOT start with HTTP or HTTPS protocols?
You could rely on the following. http://docs.oracle.com/javaee/1.2.1/api/javax/servlet/ServletRequest.html#getScheme() This will tell you whether it's http/https

Categories : Java

Naked Domain Redirect Failing when using HTTPS SSL on Google App Engine
GAE doesn't officially support naked domains. What you're seeing is a limitation of GAE, you're not doing anything wrong. https://developers.google.com/appengine/kb/general#naked_domain

Categories : Google App Engine

Redirect the login page from HTTP to HTTPS via httpd.conf
Since no one else has replied yet I will give it a try, it's untested but maybe it will give you some ideas on how to proceed. Maybe this could work: RewriteEngine on RewriteCond %{HTTP_HOST} ^login.abcde.com RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^/(.+)$ https://client1.abcde.com/$1 [L,R] RewriteCond %{HTTP_HOST} ^login.abcde.com RewriteCond ${HTTPS} !=on RewriteRule ^/(.+)$ [F] Also it looks like in your case you have ^client1.abcde.com$ instead of ^login.abcde.com$ in your RewriteRule, not sure if changing it will make your solution work. Maybe you could do the redirect in the VirtualHost as described in this RedirectSSL wiki page?

Categories : Apache

Redirect https to http using rewrite rule in webconfig file
This was asked a long time ago, but it looks like this has already been answered here: How to force HTTPS using a web.config file. Pay close attention to one of the comments that mentions that the query string is appended twice if you use the full answer.

Categories : C#

HTPACCESS redirect from HTTP to HTTPS for GoDaddy hosted account?
I asked the support guys at GoDaddy for this https redirection solutions and here is what they replied back with Thank you for contacting Online Support. To redirect traffic from the http to the https, you can do this with a standard redirect. Next to the hosting account you want to use, click Launch. NOTE: Our Windows Web Hosting accounts do not offer URL redirects. From the Settings menu, select URL Redirects. Click the New Redirect button. The New Redirect window displays. Enter the domain from your account you want to redirect. If you want to redirect all of the domains in your hosting account, check the All domains on this account. Otherwise, enter the directories containing the sites you want to redirect in the Path field. Select whether or not

Categories : Htaccess

Redirect Loop while redirecting all http requests to https using .htaccess
Just in case somebody have redirect loop when using Apache http->https rewrite behind load balancer, here's solution that worked for me. I had the same problem when used RewriteCond %{HTTPS} off for Apache behind load balancer, when load balancer does SSL stuff. If https version of the site is not configured via Apache ModSSL it doesn't set %{HTTPS} variable to "on" and keeps redirecting infinitely. The simplest solution to fix it is to target all https traffic to another Apache VirtualHost (when SSL is handled by load balancer) that is the copy of main one, but has different port (lets say 81). And in .htaccess do mod_rewrite for everything that is not on port 81: ReWriteCond %{SERVER_PORT} !^81$ RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] The second way to do this is to se

Categories : Apache

Force Tomcat to redirect to HTTPS without changing web.xml security constraints
Consider implementing a custom Tomcat Valve for doing the redirect. ValveBase is a good start.

Categories : Tomcat

HTTP POST converting to HTTPS GET on redirect by proxy server
If the client gets an HTTP 303 See Also code, it will unconditionally submit a GET request. If the client gets an HTTP 302 Found, it should submit the same type of request (POST) on the redirected URL, with user confirmation. This may not work properly on older browsers which tend to treat 302 Found as if it were 303 See Also. Anyway, having a form on a non-secure page submit data on a secure page is a bad idea. The form page may be corrupted and spied in any way you can imagine, and the user cannot be sure that the data he submits is the data he sees. Example: Your form has a "MainData" field. An intermediate phishing site can write a JavaScript to spy entered data, put a hidden "MainData" field containing whatever it wishes and show a dummy "FakeIgnoreData" field to the user. Solutio

Categories : Internet Explorer

Images uploaded in wordpress have http rather that https in URL
If you can control the src to the images, then remove the "http:" from the tag < img src="http://example.com/images/blah.png" > Bad http://abim3.improvementskills.org/wordpress/wp-content/uploads/2013/08/run_chart2.png Good //abim3.improvementskills.org/wordpress/wp-content/uploads/2013/08/run_chart2.png This way, the browser will call the image with https when needed, and http otherwise.

Categories : Wordpress

Correctly ignore all files recursively under a specific folder except for a specific file type
The best answer is to add a Resources/.gitignore file under Resources containing: # Ignore any file in this directory except for this file and *.foo files * !/.gitignore !*.foo If you are unwilling or unable to add that .gitignore file, there is an inelegant solution: # Ignore any file but *.foo under Resources. Update this if we add deeper directories Resources/* !Resources/*/ !Resources/*.foo Resources/*/* !Resources/*/*/ !Resources/*/*.foo Resources/*/*/* !Resources/*/*/*/ !Resources/*/*/*.foo Resources/*/*/*/* !Resources/*/*/*/*/ !Resources/*/*/*/*.foo You will need to edit that pattern if you add directories deeper than specified.

Categories : GIT



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.