Apache :: Redirect Some HTM Page To WordPress Page Without Path And Query String
Jan 5, 2015I want to permanent redirect some .html page from subdomain to main domain WordPress page,Redirect permanent /cat/FSBO76.URL....
View 1 RepliesI want to permanent redirect some .html page from subdomain to main domain WordPress page,Redirect permanent /cat/FSBO76.URL....
View 1 RepliesI'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??
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.
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 ?
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.
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 RelatedI have an [URL] ....
I use htaccess to rewrite it to: [URL] ...
and there is a problem, because I do not get what I need. The result is: [URL] .....
The last / sing dous not even matter, because if I write the url without the ending /, the three dots are still removed.
It looks like everywhere in the url the (in regexp) .+/ pattern is replaced with a simple / sign.
The RewriteRule is very simple, I can not imagine it has anything to do with this, but it looks this:
RewriteRule ^(.*)$ index.php?p=$1 [QSA]
I started to log the rewrite and it looks like if the specific parts of the url are replaced before the rewrite got it.
These are the first few rows of the rewrite log:
add path info postfix: E:/web/service/szerz....odes -> E:/web/service/szerz....odes/action/axgetszerzodesar/ugyfelid/46402/termekid/46032/szerzodesszam/2012.01.01/
strip per-dir prefix: E:/web/service/szerz....odes/action/axgetszerzodesar/ugyfelid/46402/termekid/46032/szerzodesszam/2012.01.01/ -> szerz....odes/action/axgetszerzodesar/ugyfelid/46402/termekid/46032/szerzodesszam/2012.01.01/
applying pattern '^(.*)$' to uri 'szerz....odes/action/axgetszerzodesar/ugyfelid/46402/termekid/46032/szerzodesszam/2012.01.01/'
webserver: Apache/2.2.22 (Win32) PHP/5.2.17
and Apache/2.2.9 (Win32) PHP/5.2.17 (I refreshed it today because of this problem)
os: win7 home premium sp1
It is tested on a linux os too, but there were no such problems.
I want to match a query string with modrewrite , the problem is that my query_string has a url as value:
%{QUERY_STRING} next=https://play.google.com/store/apps/details?pepe=1
and it doesn't work for me.
input='next=https://play.google.com/store/apps/details?pepe=1'
patttern='next=https://play.google.com/store/apps/details?pepe=1' => not-matched
but if I had to match only the uri , it works , the problem is when I try to add parameters to the query_string url:
http://someurl.com?next=https://play.google.com/store/apps/details?pepe=1
Is there any way to match that kind of query_string?
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
How come when my reseller suspends an account, the suspended page just redirects to his homepage? Does something need configuring..?
View 3 Replies View RelatedI'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]
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 RelatedI have a problem with my server. I am trying to make a subdomain, and it isn't working. I create it like how in all tutorials says here( click here ) . I completed all fields, but when i try to open the subdomain in a browser page, it's telling me, page not found / page doesn't exist. I have a dedicated server on window server 2008 for my website with a dedicated IP.
View 5 Replies View RelatedEvery 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.
Right now my stats system only shows from what website traffic is coming. I have google analytics aswell, and with all its functions, it does not tell me from exactly what webpage traffic is coming, and to what webpage the traffic is coming to.
So, let say someone is sending me traffic from www.reffererxxx.com/cool_video.html to www.mysite.com/super_cool_video.html
My statistics would only show that www.reffererxxx.com is sending traffic to www.mysite.com
Is there a way(a script/service/program) to find out exactly from what webpage the traffic is coming, and to what webpage of mine the traffic is going to?
(I do not have server logs / webalizer / awstats as my server cannot handle the log processing due to high server loads)
Is it possible to call a cron job with a query string appended to the file. I have no problem setting up crons in the cron tab..but i'd like the cron to fetch a url that looks something like
/home/php/some-file.php?a=1
is this possible directly through the cron job? I guess an alternative is call some php file that uses curl but i was wondering if there 's a direct way.
after uploading my site to the host, I want to type my domain and the home appears.
At the moment, typing my domian, an generic web host index page appears.
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)
I am trying to setup a subdomain and/or virtual host to redirect to a specific port and path. I am, however, having great difficulties doing this.
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)
This is annoying for others to type out and I am just wanting to make it look pretty. 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)
Running Apache 2.2.22 on Ubuntu 12.04...Here's (in addition to default) my papertower config in sites-available: URL....
When I restart, I get this message: [URL] ....
I'm coming from Apache on Windows and trying to set up the same workflow I had there. Basically, if I placed a folder in /www/papertower/ it would become accessible via directoryname.papertower.dev after adding the host.
I'm having a strange issue getting it going again. Oddly, when I didn't have the wordpress config set up properly and went to site.papertower.dev, it would give me the "failed to connect to database" message. This made me happy, as it meant it was pointing at the right folder. Once I fixed the database config file, however, and go to site.papertower.dev, it thinks for a moment, then goes to www.site.papertower.dev and gives me a "Oops! Google Chrome could not find www.site.papertower.dev".
I double-checked that all the appropriate mods were enabled (especially rewrite), but that hasn't made a difference.
Our servers Shared IP seems to be loading the first domain name in the httpd.conf file as the servers default page.
I want to change the default page to either our main domain or to the apaches "success!" default webpage.
We're using cpanel. I'm unsure why it's loading the first domain when you load the IP.
It used to load properly but for some odd reason stopped working. I suspect a cpanel update was the culprit.
Sometime Apache Test Page opened insted to Home page of website, also sometime Network TCP/IP error occured to same site.
I didn't change any setting of httpd.conf last period. also because this problems manily happened in countries which access internet via proxy I check site via [url] and it's working fine
Im using AJAX on my site and i need to access a seperate server instance on a different port. AJAX wont allow me to do that so i want to use Apache as a proxy but only for one page.
View 4 Replies View RelatedI am just checking apache status page in WHM
View 1 Replies View RelatedThere is a page on a separate SharePoint environment, under http://domain.edu/yyy/yyy/yyy/yyy. We have a subdomain called http://123.domain. edu . We need the home page of http://123.domain,edu to point to the SharePoint site, so when users type http://123.domain.edu , they are redirected to http://domain.edu/yyy/yyy/yyy/yyy.
The trick is this - we need all sub-directories NOT to redirect. So, whatever is under http://123.domain.edu/subdirectory should not redirect at all. Is this doable? Also, if it is, I have no clue where to go to make any changes, so any instructions would be great. So far, I have found the text file httpd.conf that I can edit, but I have no clue about the rest.
I want to add an advertising banner to every web page served.
The problem is I cannot seem to make the OutputSed command recognise absolute paths. I can make it work with a relative path for both the image and the <a> href, but not absolute, which is awkward as the webite wiill have different directories for content created by FTP for hosting results of different tournaments.
This is what I have in my vhost.conf file for the banner image:
Code:
<Directory "/var/www/fencing-results.co.uk">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
AddOutputFilter Sed htm
OutputSed "s/<body>/<body><img src="/var/www/fencing-results.co.uk/banner.jpg">/g"
</Directory>
When running OWASP ZAP web security tool, I get the following flag: Secure page can be cached in browser. Cache control is not set in HTTP header nor HTML header. Sensitive content can be recovered from browser storage.
I was surprised since i had the no cache header in both html code and httpd header.
After investigating the flag, i noticed that the response was a generic 302 found error response from Apach (located in apache/src/modules/http/http_protocol.c).
I have added a patch to code when adding the cache-control & pragma html headers with no-cache - and that had solved the security flag (patch attached).
full response given:
header:
HTTP/1.1 302 Found
Date: Sat, 30 Nov 2013 10:44:40 GMT
Server: Apache
X-Frame-Options: DENY
Location: https://*****
Content-Length: 376
Content-Type: text/html; charset=iso-8859-1
body:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>302 Found</title>
</head><body>
<h1>Found</h1>
<p>The document has moved <a href="https://******">here</a>.</p>
<hr>
<address>Apache Server at 10.209.0.81 Port 443</address>
</body></html>
In conclusion:
Issue is "Secure page can be cached in browser." (found by owasp zap) for https page response "302 Found" from Apache.
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 RelatedI can't access to some alias page by URL....
(getting 403 - Forbidden) but i can by https - [URL] ....
Code:
<VirtualHost 10.7.10.10:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
DocumentRoot "c:/Apache24/htdocs"
Alias /static "d:/static"
[Code] .....
Code:
<VirtualHost 10.7.10.10:443>
DocumentRoot "C:/Apache24/htdocs"
ServerName domain.com
ServerAlias www.domain.com
SSLEngine on
[Code] .....
What could be wrong as the config is exactly the same for both VirtualHosts
Server version: Apache/2.2.22 (Unix)
Server built: Dec 9 2012 18:57:18
OS/X 10.8.4
I am trying to run a shell program to generate a web page. When I enter it as test.cgi, it does exactly what I expect. When I enter it as test.sh
a question on mod_proxy. We're using mod_proxy as a simple reverse proxy (ProxyPass & ProxyPassReverse) to reverse-proxy various back-end PHP and Mono/.NET apps.
One problem we see is that when the back-end PHP app suffers an error (e.g. a 404 or 500) , then mod_proxy ignores the nicely-formatted custom error page served up by our PHP app, and instead serves a very plain generic mod_proxy 404 or 500 error page back to the client. Is there a way to configure mod_proxy to serve up the 500/404 error page content which is created by the back-end app ?
(We thought ProxyErrorOverride might work, but it seems to be intended for the opposite scenario, where I want to *ignore* the 404 page content from the back-end and show a mod_proxy-defined error page instead.We're using apache 2.2 on 64-bit CentOS 6.5 ( httpd-2.2.15-31.el6.centos.x86_64 )
Config like:
...
ProxyPass /abc/ http://server4/abc/
ProxyPassReverse /abc/ http://server4/abc/