w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
IPv6 address as the domain portion of an email address
You are right to look at RFC4291 for the IPv6 address format. However, for SMTP (and thus for any other email software handling addresses) you should also look at Address Literals in RFC5321. The one you want is probably "IPv6-address-literal".

Categories : Email

Redirect all traffic to from external domain to local domain homepage?
See this answer You must use modrewrite of apache: RewriteEngine On RewriteCond %{HTTP_REFERER} !^mydomain.co.uk$ [N]

Categories : Apache

Redirect any sub-domain to main domain by editing DNS Record
The CNAME is what you're looking for, although there is another alternative, you can create a .htaccess file that you'd put in the root of the subdomain containing : Redirect 301 / http://www.domain.com I don't know how this can work on IIS, I highly doubt it supports .htaccess files, but my guess is that you can do this with ISAPI filters.

Categories : Asp Net

What could cause Magento to change new address back to default address on Paypal redirect?
I had a similar bug and maybe its the same with you. If you select an address as your default address in the address book it screws up the one page checkout. Say I have 3 people in my address book: John, Suzy and Bill. One day I happen to be in my address book and I select John as my default billing and shipping address. Then I go to my cart, order some items, select John as billing, and select ship to a different address. On the next step I select Suzy as my ship to address. I click next to go to the shipping method step, but whoa, wait! Suzy's address has been overwritten and replaced with Johns address. Its exactly the same issue posted about here (although I dont think the guy understands what happened, but the screenshots are the same result): http://www.magentocommerce.com/boards/

Categories : Magento

Yii:: redirect www.domain.com/index.php to www.domain.com without using htaccess
I guess no solution without .htaccess file , so build one Set main.php in your yii configuration, at component : 'urlManager'=>array( 'urlFormat'=>'path', 'showScriptName'=>false, 'caseSensitive'=>false, ), LoadModule rewrite_module modules/mod_rewrite.so to be LoadModule rewrite_module modules/mod_rewrite.so then go to .htaccess file, and try to modify to be: RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)?*$ index.php/$1 [L,QSA] if above does not work try with this: RewriteEngine on # if a directory or a file exists, use it directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # otherwise forward it to index.php RewriteRule . index.php move

Categories : PHP

Redirect sub domain to another sub domain with the same sub folder structure
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 %{HTTP_HOST} ^games.domain.com$ [NC] RewriteRule ^(data(?:/.*|))$ http://games.domain.net/$1 [L,R=301,NC]

Categories : Htaccess

Typo3 redirect domain with prefix to another domain
RewriteEngine On RewriteCond %{HTTP_HOST} ^bli.bla.com$ [NC] RewriteRule ^(.*)$ http://bla.bli.com/$1 [R=301,L] or RewriteCond %{HTTP_HOST} ^www1.bla.com$ RewriteRule (.*)$ http://www5.bla.com/$1 [R=301,L] This example works 100% if implementet right. (TYPO3 .htaccess: "# Add your own rules here.") Maybe you should delete Cooluri or Realurl Cached links.

Categories : Htaccess

How to redirect domain:port to domain with Glassfish?
The best way is to place Glassfish behind Apache http server and configure apache to point requests to glassfish. Therefore http requests are handled by Apache and all www.example.com requests are pointed to www.example.com:12544 internally. Below is a brief explanation of how to do this. Install Glassfish 3+ (make sure your listener is created and activated on 8009 and your jk is enabled) Install Apache (2.2+) get the mod_jk connector and place it into apache modules folder to do the configurations. create a worker.properties file and place it into apache conf folder. It should contain the following properties: worker.list=worker1 worker.worker1.type=ajp13 worker.worker1.host=localhost worker.worker1.port=8009 Open httpd.conf file in apache conf folder and place t

Categories : Eclipse

301 Redirect old to New domain also non-www to www redirect (including index.php )
You can do this with a single regex in your rewrite condition: RewriteCond %{HTTP_HOST} ^(w{3}.)?(quantumeducation.in|quantum.edu.in)$ You shouldn't need to change the PHP files if the server-level redirect is working properly.

Categories : PHP

Redirect a www.domain to http://domain
Have your .htaccess like this: <IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On RewriteBase / # remove www RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] RewriteRule ^ http://%1%{REQUEST_URI} [L,R=301] RewriteRule ^index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> EDIT: Create a ServerAlias in VirtualHost entry for www <VirtualHost *:80> ServerName link-tags.com ServerAlias www.link-tags.com ServerAdmin cedric.duma@gmail.com #ServerName http://www.link-tags.com ########## Directory ########## DirectoryIndex index.php index.cgi index.html index.htm DocumentRoot /var/www/linktags <Directory /> Options +FollowSymLinks

Categories : Htaccess

NGinx config for redirecting domain
this works fine for me: http { server { listen 80; server_name service1.domain.com; location / { proxy_pass http://192.168.0.2:8181; proxy_set_header host service1.domain.com } } server { listen 80; server_name service2.domain.com; location / { proxy_pass http://192.168.0.3:8080; proxy_set_header host service2.domain.com; } } } have a try?

Categories : Nginx

domain mapping: php or nodejs & nginx
I'm assuming you own example.com, they own mappable.com, and you want to allow them to use their domain mappable.com to access your subdomain mappable.example.com hosted on your server. There are a few steps you'll need to do for this. Set up wildcard DNS with your domain registrar so that all sub-domains will come to your one server. Set up wildcard domain handling in nginx's conf on your one server so that all requests are sent to your code. You can do this using an underscore as the server name to make it the default server. In your PHP code, you can check the headers to determine what domain the request is coming in through. Do a dump of $_SERVER to see what's in there. You will then know if the request came to mappable.com, mappable.example.com, etc... Once you are in PHP with th

Categories : PHP

NGINX: node.js + php on domain + subdomain
Please include any messages you see on response of trying to visit both vhosts. As well make sure you include this setup in your nginx config as well as service nginx reload after changing configurations. In order to proxy nginx to node you have to use upstreams. Here is configuration that might suit your needs: upstream node { server 127.0.0.1:8000; } server { listen 80; server_name myawesomeapp.ru; location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|wav|bmp|rtf|js|flv|swf|html|htm)$ { access_log off; root /srv/myawesomeapp/static try_files $uri $uri/ =404; expires 365d; } location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host;

Categories : PHP

Why am I not able to have multiple domain names together with nginx?
Nginx supports multiple server blocks, and your syntax looks reasonable. I suspect the problem may be with something that is not seen above. Try to keep slimming down search server block and see if you can find the problem that way. You can also try removing other files from /etc/nginx/conf.d/*.conf to continue the simplify the problem. Following General debugging tips for Nginx may also solve your problem. You might also try starting from simple Nginx server block examples and then building them to match your needs. Finally, your prose mentioned that there was redirection involved, but I don't see redirection in the code your pasting. Is part of your configuration missing from what you posted? The problem could be in there.

Categories : Nginx

Nginx serving non-secure resources on https domain
maybe cause this is how they are called, if you need to serve every thing as https, i would create an empty server that listens on 80 and redirect to https server { # listen 80; delete this part listen 443 ssl; # the rest of the config } # add this server server { listen 80; server_name example.com; location / # or a more specific location '~ .(jpg|css|js|jpeg|png|gif)' { return https://example.com$request_uri; } } or just fix the css location, it might be an absolute URL with http

Categories : Magento

Host main domain on Apache and some of the sub-domains on Nginx
A good solution is to continue to run Nginx on port 80, while adding proxy directives to Nginx to serve as a proxy for specific domains that are running on Apache. An example Nginx configuration: server { server_name www.myserver.com; server_name myserver.com; location / { proxy_pass http://127.0.0.1:8000; } } I do this myself, and it works great.

Categories : Apache

Serving multiple node apps with nginx on same domain
Just found out what the problem was. Though my nginx configs were correct, I had not added my desired subdomain to my domain name provider (namecheap). I added my subdomain on namecheap, and everything is working correctly now.

Categories : Node Js

Rewrite root address to a subdirectory in nginx
I found help in the nginx irc chat. Basically what I needed to do was use a return instead of rewrite. So I changed this: location = / { rewrite "^$" /wiki/Main_Page; } to this: location = / { return 301 http://www.example.com/wiki/Main_Page; }

Categories : Nginx

nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
Skype uses port 80,443 by default, those are EXACTLY the http and https ports. Try shutting down skype and restarting nginx. If you are using the 'desktop version' of Skype you can change this setting by the way of tools>options>advanced>connections > untick use port 80 and 443 as alternatives. If you are using the win8 app, the only option seems to be shutting down skype completely or removing it completely. Someone has to confirm the win8 app though, I use linux.

Categories : PHP

How do I make nginx proxy some urls on a domain to one location and the rest to somewhere else
You can refer to "rewrite" and "proxy_pass" directive in nginx manual and this can be solved easily: location ~* "^/$|^/(a|b|c).*?$" { rewrite "^/(.*)$" /site/$1 break; proxy_pass http://127.0.0.1:8001; ......; // to add any commands you need break; } location / { proxy_pass http://127.0.0.1:8002; ......; // to add any commands you need break; } Because no rewrite directive wrote in server block, Nginx start to match url in location phase. If is is caught by one location (here using the 1st one as example), then enter into rewrite loop. "break" in the end of rewrite means jump out the rewrite loop. Then start dealing with other directives in this location ,here proxy_pass will be dealt with. General process in this case would be: location match --> rew

Categories : Nginx

How to redirect single url in nginx?
Put this in your server directive: location /issue { rewrite ^/issue(.*) http://$server_name/shop/issues/custom_issue_name$1 permanent; } Or duplicate it: location /issue1 { rewrite ^/.* http://$server_name/shop/issues/custom_issue_name1 permanent; } location /issue2 { rewrite ^.* http://$server_name/shop/issues/custom_issue_name2 permanent; } ...

Categories : Nginx

How to use Nginx to redirect to specific page?
add in your t.example.com location { } something like: rewrite ^(.*) http://testing.example.com/test/$1 permanent; or just simple redirect return 301 http://testing.example.com/test/;

Categories : PHP

Nginx proxy redirect without changing url
first you're using 8000 in proxy_pass, but you're mentioning your port is 8080. Second, remove the rewrite line should do the trick, because youre actually using the rewrite rule here and never get to the proxy_pass line. Something like the following should work: location /assets/ { include proxy_params; proxy_pass http://127.0.0.1:8080; } There are also proxy_rewrite and proxy_redirect commands which might help you in getting this upstream-redirect handled internally by nginx. Hope that helps!

Categories : Nginx

301 Rewrite Permanent Redirect in Nginx
In nginx change server_name from site1 to site2 and then create a new site1 block server { listen 80; server_name site1.com; location / { return 301 $scheme://site2.com$request_uri; } }

Categories : Nginx

Nginx proxy_pass with variables and redirect
I once had the same issue and what saved me was Nginx's resolver module try to add: resolver 8.8.8.8; before the proxy_pass line. It should allow you to work with variables. Also have a look at a similar question.

Categories : Nginx

nginx redirect only fails with firefox
Found the issue. Because the /blog redirected to HTTP and all other paths redirected to HTTPS, the problem was with the following configuration line: add_header Strict-Transport-Security max-age=500; When I commented out that line, the issue went away.

Categories : Firefox

Why is SSL redirect not working with force_ssl and Nginx?
First guess... the port 80 server block does not pass the host through, maybe that's it? proxy_set_header Host $http_host; The SSL block does, but if you start at the non-SSL side and Rails picks it up, it might not have the full header there?

Categories : Ruby On Rails

How to grant access to a specific IP address that is blocked by GeoIP[country] in nGinx?
Finally found the solution for this problem. 1) in nginx.conf add http { geoip_country /usr/share/GeoIP/GeoIP.dat; map $geoip_country_code $allowed_country { default no; LV yes; # in my case it is Latvia (allowed country, but all other are not) } geo $exclusions { default 0; 123.123.123.123 1; # here comes allowed IP that is in blocked country list } } 2) in your vhost configuration server{} container if ($allowed_country = yes) { set $exclusions 1; } if ($exclusions = "0") { return 403; } The main idea is from HERE

Categories : Nginx

Redirect request to two Upstream server in Nginx
Here's how i think your config could be, you can create multiple upstreams upstream main_upstream { server IP1 server IP2 server IP3 } upstream process_upstream { server IP2 server IP3 } server { location /process { proxy_pass http://process_upstream; } location / { proxy_pass http://main_upstream; }

Categories : Nginx

nginx intercepting google oauth redirect
you have server_name quickerhub.com; the get request is coming back to http://www.quickerhub.com/?code=4/bzqKIpj3UA3bBiyJfQzi3svzPBLZ.QoB_rXWZ6hUbmmS0T3UFEsPMOFF4fwI quickerhub.com != www.quickerhub.com and so nginx is falling through to serving the default page (for when it can't find a vhost). all you need to do is use server_name www.quickerhub.com quickerhub.com; or even better, add this to "canonicalise" all your urls to the version without www. server { server_name www.quickerhub.com; expires epoch; add_header Cache-Control "no-cache, public, must-revalidate, proxy-revalidate"; rewrite ^ http://quickerhub.com$request_uri permanent; }

Categories : Python

NGINX redirect rewrite "/([0-9]+)" /showthread.php?t=$1 break;
The problem is that you're trying to match something that doesn't exist in the URI, your regex exists in $args and $query_string, I'm not sure if this will work but you can try if ($args ~ "threads/.*.([0-9]+)$") { try_files /showthread.php?t=$1 =404; }

Categories : Nginx

Postfix with ip address instead domain name
As far as I know there is no way to make postfix send mail to the Internet without FQDN. It can be set up to exchange mail between local users, though, but that's obvoiusly won't help you. The reason behind it is quite simple: vast majority of the mail servers are verifying peer's identity on SMTP connection using reverse DNS lookup. If your IP has no nice DNS name assigned, then your mail is quite likely to be considered a spam. So even you will manage to bypass FQDN requrement your recipients still may not receive your mails. It can be even dangerous, as your IP may get stuck into spam lists after that. I see two options for your here: Wait for the correct domain name to be associated with your IP Or use mailbox on an established public service like gmail or hotmail to send mails from

Categories : PHP

SMF ": sender address must contain a domain"
Your sender is apache because your webserver runs with this local user. To ensure that your forum is sending mails from a explicit sender you can add this information to your php.ini sendmail_path = /usr/sbin/sendmail -t -i -F 'noreply@domain.tld' -f 'forum registration <noreply@domain.tld>' -F => name of sender -f => from header

Categories : Email

nginx: Redirect to index.html if a given URI points to an existing directory
I had an error in my code... After fixing it now 'http://mydomain.com/css' serves contents from index.html. I was using & instead of $ in the regular expression...

Categories : Nginx

regular expression for the address of domain name server
A very simple regex could be something along ^www.[a-zA-Z0-9]+.[a-zA-Z0-9]+(.[a-zA-Z0-9]+(.[a-zA-Z0-9]+)?)?$ Three points: the point (.) is a special character and must be escaped (.) we need optional clauses for the last two sections. your examples start with www, so you need to include this in order to use the start mark (^)

Categories : Java

Validate domain name and ip address using regex in Rails
IP Adress: /^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}(?:-([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))?$/

Categories : Ruby On Rails

Redirect to another domain
Ok so a few things here. First, If you have been using the .info rather than a dev box, the site may have already been indexed. Even if you relocate the content, you need to 301 the .info. Id depends on how complex the site is. If you have just launched I would move it to the .com and either. A. 301 the .info to the .com B. Go into webmaster tools and submit to remove the .info from Google's index (You will have to set that up if you have not).

Categories : Wordpress

Using htaccess to set handling page for ALL address accessed on domain
What about the dynamic loading of the domain to replace yoursite.com Like this: #this rule removes www from the URL if its used RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] #this rule handles the subdomains RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{HTTP_HOST} !^www. [NC] RewriteCond %{HTTP_HOST} ^([a-z0-9]+).(.*)$ [NC] RewriteRule ^(.*)$ index.php?/public_site/%1/$1 [L]

Categories : PHP

Google search result is displaying ip-address instead of domain name
You should do a permanent redirect from http://ip-xx-xx-xxx-xxx.static.privatedns.com/* to your real domain. With nginx, it's only a matter of adding a virtual host: server { listen 80; server_name ip-xx-xx-xxx-xxx.static.privatedns.com; rewrite ^(.*) http://my-real-domain.com$1 permanent; } You may also find it useful to add your site to Google Webmaster Tools and monitor it.

Categories : Nginx

Django Custom Form Validation IP address and Domain name
Would this logic be done within the form or the view ? Both places. Validate in javascript on the client-side to avoid dumb mistakes taxing your server resources. Then validate on the server-side to avoid having bad data in your db. Form that is passed to the CacheCheck class is this a form of mixin or subclassing? This is a form of subclassing. CacheCheck inherits Form.

Categories : Python



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