Apache :: IP And Page Specific Redirect?

Feb 19, 2014

I'm trying to get code to go in a .htaccess file that when a specific IP tries to get a specific page, he/she is redirected to another page.

I have tried many variants of this code below ...

Code:

RewriteEngine On
RewriteCond %{REMOTE_ADDR} ^12.345.678.90$
RewriteCond %{REQUEST_URI} /requested-page.html$
RewriteRule .* /redirect-to-this-page.html [R=301,L]

... and nothing works. My webserver gets hosed, and my otherwise working system gives me an error when I try to get a page from it. I am, by the way, using Mac 10.6.8, with Apache 2.2 on both server and client.

What will work??

View 6 Replies


ADVERTISEMENT

Apache :: Redirect Any Specific Page Of Site To Homepage

Feb 19, 2015

How do i redirect URL: example.com/page1 to example.com..i want to redirect any specific page of my site to homepage.

View 3 Replies View Related

Apache :: How To Redirect Specific Useragent On Specific URLs

May 20, 2015

I have question: How to redirect specific useragent on specific URLs to specific URLs in .htaccess [Question]

E.g.:

I want to redirect 301 with conditional:

Code:
useragent: Firefox
from my url1: domain[dot]com/old-url1/
from my url2: domain[dot]com/old-url2/

to

Code:
to new url1: in my url1: domain[dot]com/new-url1/
to new url2: in my url1: domain[dot]com/new-url2/

I create this in my .htaccess but not work

Code:
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} googlebot [NC]
RewriteRule ^/?this-is-url/?$ domain[dot]com [L,R,NC]

View 1 Replies View Related

Apache :: Redirect Some HTM Page To WordPress Page Without Path And Query String

Jan 5, 2015

I want to permanent redirect some .html page from subdomain to main domain WordPress page,Redirect permanent /cat/FSBO76.URL....

View 1 Replies View Related

Apache :: Mod Rewrite Rule To Prevent Access To Specific Page?

Jun 25, 2013

This is the mod_rewrite rule I'm trying to create. I am very new to Apache admin. Here's the issue:

I have 3 vhosts running on my HTTPD Apache 2.2.24 server: Server1, Server2, Server3. Each vhost is connected to a Weblogic application server. We are trying to prevent access to the Example.portal page on each application server.

So the URLs I'm trying to rewrite are:

- Server1.domain.com/PortalWeb/Example.portal
- Server2.domain.com/PortalWeb/Example.portal
- Server3.domain.com/PortalWeb/Example.portal

So, I would like to redirect the above URLs back to the 'root' of the website. ie: server1.domain.com. Here is my rewrite rule:

RewriteRule ^(.*)/Example.portal$ http://$1 [NC]

So, the rule is matching correctly to URLs that contain Example.portal, however the back reference from (.*) does not seem to map to $1.

View 6 Replies View Related

Apache :: Setup Subdomain / Virtual Host To Redirect To Specific Port And Path

Mar 13, 2013

I am trying to setup a subdomain and/or virtual host to redirect to a specific port and path. I have setup my server with DDYNS through my domain name registar. Through the ddyns client I have set it to assign a subdomain of "outside.name.com" so that my server will have a easy name to get to instead of a dynamic ip address.

I have also setup on my registrars host records another subdomain of "inside.name.com" with a static IP address for internet network accessing to my server.My problem is that I have a service/program on my server that I need access to both internally and externally and this service can only be access through a port of 32400 and HTTP address of /web. (e.g. outside.name.com:32400/web or inside.name.com:32400/web)...

Is there a way that I can create a VirtualHost or Subdomain of "service.*.name.com" that redirects them to ":32400/web" of the hostname they're on? (e.g. service.outside.name.com automatically forwards or proxies--to keep it pretty--to service.outside.name.com:32400/web)

View 1 Replies View Related

Apache :: How To Redirect All Pages To One Page Of New Directory

Aug 20, 2005

I'm hoping to redirect visits to any page in an old directory to the index page of a new directory.

In other words, redirect:

[URL] ....

[URL] ....

Is this possible? If so, how could I do it?

In my .htaccess I currently have:

Code :

RedirectPermanent /facts/ http://www.domain.com/newfacts/

but this only redirects the index page.

View 19 Replies View Related

Apache :: Redirect Every Single Page From Old Subdomain

May 12, 2015

Wordpress installation (WPML with 3rd level domain es. site. com, fr. site. com).I need to redirect page from old subdomain to a new subdomain

Example:
esp.site.com/oldpage -> es.site.com/newpage (different subdomain)
esp.site.com/oldpage1 -> es.site.com/newpage
esp.site.com/oldpage2 -> es.site.com/newpage

Source site is very chaotic (static pages + wp pages) and there are no clear rule for redirection (no regex ).So I need to redirect every single page but syntax:

Redirect 301 esp.site.com/oldpage http:// es.site.com/newpage doesn't work!I think "esp.site.com" in source page is not acceptable syntax..which is the correct syntax ? Can I manage all from one .htaccess file in main root (www) or should I create "esp" directory (and point old subdomain to it - one for every language) and put .htaccess in every directory with redirection ?

View 1 Replies View Related

Apache :: Create Redirect To Non Existing Page

Apr 10, 2015

I need to create a redirect to a non existing page.

Here is my code and the site is on shared hosting

<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^index2.php#!(.*)$ /index2.php/$1 [R=301,L]
</IfModule>

This would be [URL] ....

I would like to redirect Every request with "#!string" to new url (same page) - [URL] ....

I know that the code above needs

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

to be added but it doesnt even makes the redirect to 404. The url doesn't change.

View 8 Replies View Related

Plesk 11.x / Linux :: How To Know If Nginx Served A Specific Page

Jun 3, 2014

I have setup Nginx to serve static pages. I cache some pages and therefor they are static and should be served by Nginx. Now, how can i check if a specific page actual was served by Nginx and not Apache?

View 1 Replies View Related

Why Does The Suspended Page Redirect

Jul 14, 2009

How come when my reseller suspends an account, the suspended page just redirects to his homepage? Does something need configuring..?

View 3 Replies View Related

Hacked Page, Redirect

Nov 3, 2008

I'm running into this issue over and over again. It seems like it goes like this...

Someone searches for one of my clients domains (all on one server) in google. When they click on the link in google, they get the google alert that it's an attack site (and in fact when you look at the address line you see that it's being redirected to an IP address). This only happens once, and when you click on the site again it works fine.

The IP address, or at least one, is 91.205.233.31

I found an article about dns cache poisoning, but that seems to be on the end user side of things, and as this is happening across a lot of different users, my instincts say it's something to do with my host.[url]

View 10 Replies View Related

Page Hijack Using 302 Redirect

Sep 11, 2007

There is a security flaw in the Page 302 redirect. Basically, a Page 302 redirect is a temporary redirect used to inform search engine spiders of the new temporary location of a web page. Using this redirect, a malicious user or competitor can get your site off the SERPS.

View 1 Replies View Related

Plesk 12.x / Linux :: New Install - All Domains Redirect To Landing Page?

Mar 5, 2015

Every domain that I have added just goes to the default Plesk landing page. I have:

* Added them as new subscriptions
* Added domains to a current subscription
* Verified that the index.html file is deleted
* Verified that vhosts is pointing to proper directory
* Confirmed that sites work when clicking 'preview'

If it matters, this is an Ubuntu install.

View 2 Replies View Related

Apache :: Restrict Access To A Set Of IP In Specific URL

Jan 18, 2014

I have Apache 2.2 installed on my Unix Server and have a couple of Application servers running each of them having similar Document Root.

For example, The URLS will look like below

https://my-test1.com/demo/index.html
https://my-prod1.com/demo/index.html
https://my-qa1.com/demo/index.html

The directory folder looks like

/myapp/my-test1/demo/index.html
/myapp/my-prod1/demo/index.html
/myapp/my-qa1/demo/index.html

I would like to restrict access to the above prod1 URL for a specific set of IP's. How can I achieve this.

View 1 Replies View Related

Apache :: How To Detect Where User Has Come From A Specific Website

Nov 1, 2013

configure Apache server to handle users requests using condition based on where he come from so i can redirect him . what i need if user came with from site start with xn--* redirect him to virtual host and if he came from any other link then go to another virtual host

View 2 Replies View Related

Apache :: How To Restrict Access Via IP Address For Specific Webpages

Apr 17, 2014

I'm using Concrete5 CMS to create a website. This CMS creates/manages all its webpages in a mySQL database. Thus, there is no physical folder associated with each webpage, so I can't simply create an .htaccess file and place it in the directory tree in the right sub-folder to restrict access for that sub-folder and all folders it contains.

I have one .htaccess file located at the root level (e.g top-level folder for the website).

QUESTION 1: I need place in this top-level .htaccess file to (1) restrict access to only two specific IP addresses that I can specify (blocking access to all other IP addresses), and (2) specify the URL addresses that I wish to apply this rule to?

For example, let's say my website is [URL] ....

And I want to restrict access to the [URL] ....

and my .htaccess file is located at

/home/myname/public_html/conc/.htaccess

What code can do that?

View 1 Replies View Related

Apache :: How To Deny Access To Specific File Using HTAccess

Jun 21, 2014

I would like to deny access to .log

View 1 Replies View Related

Apache :: How To Block A Specific (Query String) URL Via HTAccess

Mar 18, 2013

I don't know how to block a specific QUERY STRING url via .htaccess file, well actually I want to block this type of url :

test.php?q=RANDOMTEXT=&tl=The%20path%20ends

View 2 Replies View Related

Apache :: How To Select Specific File With Path Using HTAccess

Jun 14, 2014

I want to select a specific file by its path using .htaccess to allow access to it.

View 1 Replies View Related

Installed Apache And PHP Only Seeing Default Apache Page

Jun 1, 2007

I am having an issue where I have a server that Directadmin is installed on. I go to the a url that is on the server and all i see is the default page of apache saying congrats, it is installed. Although there is no file like that in the public_html any longer and I can see my files in the public_html folder of that specific site.

View 6 Replies View Related

Apache :: Security Challenge - Rejecting Specific Requests Without Blocking IP

Jan 21, 2014

I have been trying to solve a big problem for the last 2 weeks with one of our servers.

The client using our system (web based w/ apache and php) is a contact center firm. They have about 120 operators, all connect to our websever with the same IP.

We have been suffering DoS attacks from some of these operators. This are simple, browser attacks , namely 5 or 10 operators will just hold F5 key and bombard the server with requests when they shouldnt.

We did manage to produce a php protection which will recognize the multiple requests and blacklist the user, but its "too late" because the request have already been sent and processed by the webserver.

We use the user ID in the system to control who should be blacklisted, so this is all dependent on our own authentication.

Ideally, we need something EXACTLY like mod_evasive, but for rejecting single requests instead of blocking the IP. Exemplifying : if a user calls the same url, 5 times, in a 3 second spawn, we will reject every next request for 30 seconds, but only the requests by that user.

If the webserver can make any use of it, the user id is stored in a cookie.

View 4 Replies View Related

Install Apache And Run It On Specific Mentioned Ports Between 2110 To 2250

Jan 8, 2013

installing an apache server in Linux centos and run it on any port between 2110 to 2250. I dont have much idea about the installation.

I have logged in to SU and install apache by " yum install httpd"

now how to I host on port betwwen 2110 to 2050 forwarded ports.

View 2 Replies View Related

Apache :: URL Redirect / Forwarding?

Jun 3, 2013

Description :
- Windows 2008 server
- Apache 2.4 into a DMZ

What I did in HTTPD.CONF file :
comment #Listen 80

UNcomment following lines
-LoadModule proxy_module modules/mod_proxy.so
-LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
-LoadModule proxy_http_module modules/mod_proxy_http.so
-LoadModule rewrite_module modules/mod_rewrite.so
-LoadModule ssl_module modules/mod_ssl.so
-Include conf/extra/httpd-ssl.conf
-LoadModule socache_shmcb_module modules/mod_socache_shmcb.so

I did also create a self sign SSL certificate.

From the WAN, users will connect with such an URL .... This URL can be resolved from DNS.

What i try to do :

The Apache server must be configure to accept connection only from the ip address of the FW

The apache server must act as a Reverse Proxy and redirect the URL to an internal server with URL ....

Of course, external peoples should only see the url they input to connect.

View 2 Replies View Related

Apache :: How To 301 Redirect Queries

Feb 18, 2013

I have just upgraded my website, and set 301 redirects for all old pages.

But on the old website I used a search engine, and in Google Webmaster there are loads of 404 pages with search queries. They look like this: [URL] ....

Simply redirecting search.php doesn't work, so I guess I need to use a wildcard?

View 2 Replies View Related

Apache :: Redirect Exact Url?

Jan 6, 2015

I'm using a .htaccess file to redirect only example.com/script-dir/index.php (with www and without) to example.com/index.php, but it also redirects example.com/script-dir/index.php?page=faq and other pages.

What should I do to redirect only that single page? 

View 2 Replies View Related

Apache :: 301 Redirect Not Working

Jul 29, 2013

I'm having trouble getting a Redirect to work. I'm doing a remake of an old site that I did over 10 years ago and I'm going to need to do a lot of redirects once I change over, but I wanted to test it out to make sure I know what I'm doing before I get rid of the old site. My current old site is www.antstuff.net. I will be keeping the same domain when I change, but it's current url naming system is different from the program I use now (Joomla). It's current url syntax goes like: www.antstuff.net/html/ant_farm.html Whereas the remade Joomla site will simply be www.antstuff.net/ant-farms . I don't want to lose all of my inbound links so I'll need to redirect every old page to the new pages right?I wanted to test it first to see if I could get a redirect to work so I added a line to my .htaccess just to try and redirect from one page to another.

Redirect 301 /html/ant_farm.html http://www.antstuff.net/html/queen_ants.html

Nothing happens. It does not redirect to a different page at all.Also, there is a bunch of other crap in my .htaccess file that has built up over the years. Could that mess anything up?

Update: Interesting thing happened. When I went to submit this post, I got an error that said that there is a redirect in the url that I entered, please use the destination url instead. So I removed the line of code from my .htaccess before submitting. Nevertheless, nothing happens when visit that particular page. It's supposed to transfer me to the other page right? 

View 2 Replies View Related

Apache :: Redirect Www To Non Www In Subfolder

Nov 6, 2014

I have joomla installed on root folder and another joomla installed on subfolder. I want to redirect www to non in subfolder by this code in blog htaccess:

RewriteCond %{HTTP_HOST} ^(www.mydomain.com)?$RewriteRule ^(.*)$ http://mydomain.com/blog/$2 [R=301,L]

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved