how do i redirect a USB tty (arduino) to a file in Macos X 10.6 in Terminal ?
"screen /dev/tty.usbserial... 9600"
works, but
"cat /dev/tty.usbserial..."
does not, but blocks.
How can I use mod_rewrite on Apache to direct any request for any page in a particular VirtualHost to another domain? i.e. something like:
<VirtualHost whatever.com:80>
Redirect * to http://www.some-other-domain.com/some-page.html
</VirtualHost>
How I can redirect sitemap.xml file access to different subfolders, if it can be reached from three different domains?
domain1/sitemap.xml - dominio1/es/sitemap.xml
domain2/sitemap.xml - dominio1/de/sitemap.xml
domain3/sitemap.xml - dominio1/uk/sitemap.xml
domain1, domain2, and domain3 target to the same folder.
Is it possible? How can I do this? Should do it with PHP ?
PS: The server is a linux running apache, the web platform is a wordpress.
I am trying to push DNS to the client with OpenVPN server with config:
push "dhcp-option DNS 192.168.x.x"
It is working well, but what I really need is that during the VPN connection I do not want to use my primary resolvers, clients should use only the DNS provided by the server.
It can be done with push redirect-gateway, but I do not want to tunnel all connections from the client thru the VPN, only specific networks.
Is it possible to do it somehow?
Linux clients are OK with a script, on Windows I am not sure
Right now I have a server running on IP:Port. If I wanted to use DNS but redirect to the port, how would I do so? I've heard that it's possible, but how would I do so, even if it includes creating something such as a proxy?
For example, visiting:
domain.tld
would instead access
IP:Port
and the port could be anything I wanted it to be.
If no direct solution exist, how would I go along using a "VirtualHost"?
I have an interesting problem I need to solve in nginx: one of the sites I'm building receives inbound traffic on port 80 (and only port 80) which may have a certain header set in the request. If this header is present I need to capture the value of it and append that as a querystring parameter before doing a temporary redirect (rewrite) to a different (secure) server, while passing the paramater and any other querystring params along. This should be very doable, but how!?
Many thanks,
JS
I have a Joomla site in the root directory of my domain, and I have a forum at /forum subdirectory.
How can I redirect visitors from the main site to the forum, continuing to have the possibility to access the site from a link at the forum?
Example:
http://example.com
redirected to
http://example.com/forum
, but I can access the main site by the link
http://example.com/index.php
I am using .htaccess file to redirect all web traffic in a folder to ssl, because the directory prompts users for a login. When a user logs in they are redirected from https://subdir.mailmarkup.org/ to https://subdir.mailmarkup.org/~homedir/subdir.
I want users to be redirected from http to https, and this is occuring successfully, however, I do not want users redirected from the first path mentioned above to the second. How do I prevent this?
I am trying to redirect /folder to / using .htaccess but all am I getting is the Apache HTTP Server Test Page.
My root directory looks like this:
/
.htaccess
-/folder
-/folder2
-/folder3
My .htaccess looks like this:
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/folder/
RewriteRule (.*) /folder/$1
What am I doing wrong? I checked my httpd.conf (I'm running Centos) and the mod_rewrite library is being loaded. As a side note, my server is not a www server, it's simply a virtual machine so it's hostname is centosvm.
When i created my (server08/IIS7) server's SSL certificate I mistakenly defined the common name to be 'myDomain.com' instead of 'www.myDomain.com', meaning that https://www.myDomain.com comes up untrusted.
I understand that I can create a server redirect to correct the problem but I don't see where/how to do that from IIS's server manager.
thx
I have multiple IP addresses on the same server and I would like to redirect all outgoing traffic on port 80 to a different IP on the same server just no to use always main IP.
Currently I'm using this:
/sbin/iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to-source IP;
and it works well, but it redirects everything and when I make backups over SSH backup it's failing.
System: CentOS 5.8 64-bit
I am trying to redirect traffic from one IP reached on a specific port to a website.
For example I have two external ips, lets say 194.145.63.1 and 194.145.63.2 set on one network card as 194.145.63.1 - eth0 and 194.145.63.2 -eth0:1
mywebsite.com allows access only from 194.145.63.1 and I want to set my rules like if I hit http://194.145.63.2:8080 to open mywebsite.com trough 194.145.63.1.
Thanks in advance!
Hi,
I have a subdomain named http://arun.rocks.com and another domain named www.rocks.com/projects/main.php/. I want my subdomain to always redirect to www.rocks.com/projects/main.php/. How to do this? Kindly help
Hello,
I'm using Zend Framework but I have a little problem:
How could I redirect internal all requests from
localhost/zendframework/
to
localhost/zendframework/www/
What have to put into my .htaccess in the folder localhost/zendframework/?
i have 2 domain, 1 is old domain, 1 is new domain
i setup my new site in new domain, but i wish to have the new www.example.com/testing/ redirect to the old domain's folder.
can it be done? how?
I'm almost done writing the .htaccess file to redirect some URLs to a new domain.
One final thing: I have URLs with this structure:
http://www.domain.be/?s=searchterm
How do I capture them?
RewriteRule ^\?s=(.*)$ http://newsubdomain.domain.be/?s=$1 [NC,L]
Any ideas?
patch - C:\Windows\System32\drivers\etc\hosts
How can I redirect all websites to other website?
example for one:
62.85.117.104 delfi.lv
i need for all websites..
62.85.117.104 *
(not work)
I have an API that used to run on Apache but now is served via lighttpd. I can easily switch the API URL in the app to the lighty port like api.net:81. I wonder if I should use mod_proxy instead to have cleaner urls. There is no redirect for legacy urls necessary. What would be the overhead for the Apache in between compared to the direct call?
Would mod_proxy and Apache steal the benefit of lightys lightweightness?
I am having issue in the last line of the below code which is causing the redirect loop (at least that's what i think so)
RewriteEngine On
RewriteBase /jgel/
RewriteCond %{REMOTE_ADDR} !^172\.172\.121\.142
RewriteCond %{REQUEST_URI} !maintainance\.php
RewriteCond %{REQUEST_URI} !resources/(.*)$ [nc]
RewriteRule ^(.*)$ maintenance.php [R=307,L]
I have tried this and this too doesn't work
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^172\.172\.121\.142
RewriteCond %{REQUEST_URI} !maintainance\.php
RewriteCond %{REQUEST_URI} !resources/(.*)$ [nc]
RewriteRule ^(.*)$ /jgel/maintenance.php [R=307,L]
Hi All,
How in DNS can i redirect all A and MX records from example.us to example.org?
Therefore:
Users who go to www.example.us will be forwarded to www.example.org
An email to [email protected] will be forwarded to [email protected]
Thanks
I need to redirect the following instances to https://www.mydomain.com;
mydomain.com
www.mydomain.com
http://www.mydomain.com
I have the following in my .htaccess already, but this only redirects mydomain.com to https://www.mydomain.com;
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
Grateful if anyone could perhaps tell me what I need to add. Thank you.
Why is http://compassionpit.com/blog/ going through an infinite redirect loop? Here's my nginx conf file. The site is run by a nodejs server on port 8000 and Apache serves up the blog (wordpress) and the forum (phpBB). The forum is resolving just fine, at http://www.compassionpit.com/forum/ ...
server {
listen 80;
server_name www.compassionpit.org;
rewrite ^/(.*) http://www.compassionpit.com/$1 permanent;
}
server {
listen 80; # your server's public IP address
server_name www.compassionpit.com;
index index.php index.html;
location ~ ^/$ {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location @blogphp {
internal;
root /opt/blog/;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:8080;
}
location ~ ^/(forum|blog)/($|.*\.php) {
root /opt/;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:8080;
}
location ~ ^/(forum|blog) {
root /opt/;
try_files $uri $uri/ @blogphp;
}
location ~ ^/(forum|blog)/ {
root /opt/;
}
location @backend {
internal;
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location ~ / {
root /opt/chat/static/;
try_files $uri $uri/ @backend;
}
}
I am working on an AJAX site and have successfully implemented Google's AJAX recommendation by creating _escape_fragment_ versions of each page for it to index.
Thus each page has 2 URLs:
pretty: example.com#!blog
ugly: example.com?_escaped_fragment_=blog
However, I have noticed in my analytics that some users are arriving on the site via the "ugly" URL and am looking for a clean way to redirect them to the pretty URL without impacting Google's ability to index the site.
I have considered using a 301 redirect in the head but fear that Googlebot might try to follow it and end up in an endless loop.
I have also considered using a JavaScript redirect that Googlebot wouldn't execute but fear that Google may interpret this as cloaking and penalize the website.
Is there a good, clean, acceptable way to redirect real users away from the ugly URL if for some reason or another they end up arriving at the site that way?
Site is a Joomla 2.5 site. I wanted to add a non www to www redirect to the htaccess file, did so, then the redirection went mad, reversed but still the site redirects.
When i click view site in admin panel, i get linked to http://domain.comindex.php/
The website is http://www.domain.com
Visiting the website URL works without www, but once you click on projects it acts mad too.
Projects is managed with joomshopping extension.
EDIT: the redirect also happens when rewrite is deactivated in admin panel.
##
# @package Joomla
# @copyright Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
# @license GNU General Public License version 2 or later; see LICENSE.txt
##
##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
##
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
## Mod_rewrite in use.
RewriteEngine On
## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site block out the operations listed below
# This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root homepage
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.
## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects
##
# Uncomment following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##
# RewriteBase /
## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the request is for something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
Redirect 301 /index.html /index.php
Redirect 301 /services /project
Redirect 301 /projects/projects.html /project
Redirect 301 /projects/project1.html /project
Redirect 301 /projects/project2.html /project
Redirect 301 /projects /project
Redirect 301 /keypersonnel.html /about-agrin/keystaff
Redirect 301 /cooperation.htm /about-agrin/intcoop
Redirect 301 /member.html /about-agrin/memberships
Redirect 301 /contact.html /contacts
Redirect 301 /hr.htm /jobs
Redirect 301 /index.php/404 /index.php
I tried making the following change to my wordpress site to permanently redirect a common link to a new page. I could've -sworn- that this used to work. But it simply does not (at least in WP 3.9). I have had to resort to using a Redirect Plug-In.
I'm wondering -why- it doesn't work and if there is a technique which -will- work. I'd prefer to continue to use .htaccess for simplicity.
Below is the .htaccess file:
# MY CHANGES
Redirect 301 http://mysite.com/gigs http://mysite.com/booking/
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Again, it works by using a redirect plug-in inside WP, but there must be a way to force the 'redirection' to occur -before- the URL is passed to the WP engine, right? How is the done?