Cross Domain .htaccess

Jan 1, 2007

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

That's the wordpress .htaccess

What makes me wonder is if we delete RewriteCond %{REQUEST_FILENAME} !-f, it won't work.

As if there is a recursion. However, there can't be a recursion given the [L] thing right?

View 0 Replies


ADVERTISEMENT

Apache :: Cross Domain / Setting Up HTAccess

Mar 30, 2014

I'm trying to set up a login script on twenty subdomains that will be checked on another subdomain. I've found this example for different domains and figure it should be simple enough to utilise but my ereg is crappy

<IfModule mod_headers.c>SetEnvIf Origin "http(s)?://(www.)?(domain1.com|domain2.com)$" AccessControlAllowOrigin=$0$1Header add Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin</IfModule>

View 4 Replies View Related

Htaccess - Moving Site From Subdomain To New Domain

Oct 21, 2007

I have what I think is kind of a unique situation with a site move and Google is not turning up an answer that seems to work.

My site is currently in this format:

www.mydomain.com/site/file.html

And I am "moving" it but also switching from html to php, so the same file would be found at:

site.mydomain.com/file.php

I want to redirect users going to the old pages to their equivalent on the new site, however this is a little bit of a problem because this is a normal subdomain - it is the same directory as before but now there are php versions of the html files.

Right now I have all of the http files redirecting to their php equivilents, but I don't believe this is a desirable solution. Also it creates a problem when people go to www.mydomain.com/site (not indicating a specific file; just the subdir root) because I have www.mydomain.com/site/index.html redirecting to www.mydomain.com/site/index.php.

Quite a mess.

My first option is to put the redirects in the htaccess file on the "old" site. But is this a problem because there are over 500 pages on the site? Does it create a heavy server load because any requests force the server to serve a huge htaccess file?

The next alternative seems the most preferable although I'm not sure how to do it. It seems it could use wildcards so that anyone going to *.html gets directed to *.php or something like that. The only problem is that there are a small number of files that were removed completely and do not have php equivilants (about 5 or 6) and would need to redirect to the index.php in the root

View 14 Replies View Related

Plesk 11.x / Linux :: Domain Forwarding With HTAccess

Jun 14, 2014

I have re-built a website on a new domain. Now I want to redirect http://www.olddomain.com/anything or http://olddomain.anything to www.newdomain. Because the file structure is totally different, I want all redirections to go to the Home Page of newdomain.

Initially, I used Standard forwarding in the Plesk CP but that attempts to keep the filename the same. So www.olddomain.com/wibble tries to go to www.newdomain.com/wibble. But wibble dies not exist on the new domain.

Should I use htaccess with physical hosting instead on olddomain.com? Is the following correct?:

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com [R=301,L]

Will that basically cover any request? Anything that people have saved or which appears in Google searches, no matter whether http:// or http://www.

And for neatness on the new domain, I would like to add www to any request like http://newdomain.com/whatever to go to http://www.newdomain.com/whatever which I think means that Google analytics will report more accurately.

So would my htaccess file on newdomain.com be like this?:

Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^newdomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

View 3 Replies View Related

Apache :: HTAccess For Main Domain Not Affect Subdomanis

Jul 1, 2015

I have maindomain.com addon-1.com addon-2.com addon-3.com

The addon domains are folders in main domain's root.

The problem is maindomain's htaccess is affecting the addon domains. I want the add on domains to have their own htaccess. The addon domains should not be influenced by main domain's htaccess

I did some research online and someone says this method works:

Code:

RewriteCond %{HTTP_HOST} ^(www.)?addon_domain.com
RewriteRule .* - [L]

But the above assumes you only have one addon domain. I have multiple.

Which code is correct? This

Code:

RewriteCond %{HTTP_HOST} ^(www.)?addon-1.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} ^(www.)?addon-2.com
RewriteRule .* - [L]
RewriteCond %{HTTP_HOST} ^(www.)?addon-3.com
RewriteRule .* - [L]

Or this

Code:

RewriteCond %{HTTP_HOST} ^(www.)?addon-1.com
RewriteCond %{HTTP_HOST} ^(www.)?addon-2.com
RewriteCond %{HTTP_HOST} ^(www.)?addon-3.com
RewriteRule .* - [L]

do I put the code at the beginning of main domain's htaccess?

View 3 Replies View Related

Cross-connects And BGP

Jun 27, 2008

I have a facility that offers racks and bandwidth (expensive), however the same facility is a POP for Cogent as well, who after I contacted informed me that I can buy bandwidth from them directly and just have the racks with said facility.

Now, besides my servers, do I need to own anything in order for me to mix my 100MB uplink from my Rack provider and Cogent?

I am assuming that with Cogentco I will be able to get IPs more easily and thru them, so if I renew my contract I don't have to migrate class C no matter what datacenter I host (as long as I have cogent in the mix, correct?)

BTW; is it usual to get charged anything for BGP or cross-connect, what do you pay?

View 6 Replies View Related

What Is Cross Connect

Apr 3, 2008

I'm getting a cabinet colocation with a provider and on the sales order there is a setup and re-occurring fee for "cross connect". My rep explained it's for the connection from my cabinet to their switch. Is this a typical charge for colocation? I thought cross connect is for connecting from their facility to 3rd party providers.

View 13 Replies View Related

Cross Scripting Attack

May 10, 2009

On IIS6 many of thesite are under cross scripting attack I tried by remove the the code but it affects again after some time I reset the ftp password and passowrd is a combination of complex alpna numeric character.I have cheked the permission it is ok.

How you guys fight with cross dcripting attack.

View 9 Replies View Related

Linux Cross-connect Routing

Mar 14, 2007

I have two RedHat EL 4 boxes linked via a cross-connect. One is a web server (10.0.0.3) and one is a mySQL server (10.0.0.2), the interface between them is eth1 on both machines and a second interface eth0 connects to the internet.

I want to use the web server to send queries to the database server via eth1, 10.0.0.2:3306 in this case. If I send a database query via eth1 there is a delay of about 10-20 seconds before the result comes back. If I send the same query to the database server but use it's main IP instead of the internal IP so that the query is being sent to it over the internet (xx.xx.xx.xx:3306), the result comes back instantly.

Similarly, if I send a query from any remote server the result is instant.

Why should there be such a huge delay when sending a query directly through the cross-connect?

The routing table ( ip route show ) for the web server is:

xx.xx.xx.xx/xx dev eth0 proto kernel scope link src xx.xxx.xx.xx
10.0.0.0/24 dev eth1 proto kernel scope link src 10.0.0.3
default via xx.xx.xx.xx dev eth0

and the routing table on the database server is:

xx.xx.xx.xx/xx dev eth0 proto kernel scope link src xx.xx.xx.xx
10.0.0.0/8 dev eth1 proto kernel scope link src 10.0.0.2
default via xx.xx.xx.xx dev eth0

I have ifcfg-eth1 on both boxes:

DEVICE=eth1
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.0.0.3 / 10.0.0.2
NETMASK=255.255.255.0

Both boxes can ping each other and transfer files using wget without any apparant problems or delays.

Anyone have any ideas on how to fix this 10-20 second delay when sending queries through the cross-connect?

View 3 Replies View Related

Apache :: Make CGI Cross Platform?

Aug 23, 2014

I would like to make a cgi cross platforms. Some servers are running Ubuntu server, 32 bit others are running Centos 64 bit and so one. How do i make a cgi script that run well at least for Linux based operating systems such as Debian, Ubuntu, RedHat and so one ?

View 1 Replies View Related

Backup: Offsite, Cross VPS, Security Of Backups

Feb 11, 2008

I have two VPS's, VPS1 has one vbulletin community. VPS2 has about 10 cpanel accounts, mostly email, a blog site, etc. Both VPS's well under 10 gig in size not including any backups stored on the VPS.

For the more important VPS, VPS1, I am packaging the cpanel account (50mb) and SCPing it to VPS2.

I am also running pckgacct on the cpanel accounts on VPS2 (about 2 gig total, 1 tar.gz is 1.5gb, three others around 250mb, others smaller) and storing them on VPS2.

I then have WS_FTP scheduled to download the cpanel tar.gz files each night to a local machine.

I also have WHM setup to do daily incremental backups, but am not moving any of these offsite.

So, it seems I have three options:
Keep doing what I am doing.
Keep moving VPS1 tar.gz files to VPS2, but also start moving VPS2 tar.gz files to VPS1.
Start moving tar.gz files (or raw files with rsync) to offsite storage.

I'm curious on some feedback about the three options. These are personal sites, I am not reselling any sites/packages.

It seems like from a data security standpoint (email and stuff), the more 'locations' introduced into the loop, the less security there will be. Does anyone get concerned about moving their email and other data to offsite storage services?

As I said, I have a technical solution currently working, but I am wondering about the theory/data protection aspects of the various options for going forward.

View 1 Replies View Related

Cross Connect Fees Equnix And Level3

Apr 7, 2008

How much do cross connect fees cost in the Equnix/Dallas Infomart and a Level3 owned datacenter? Is it priced according to what size circuit?

View 1 Replies View Related

Equinix Cross Connect Fees...how Was Ur Experience

Jun 8, 2007

i am about to sign up for equinix's colocation service in LA. I am just curious if anyone else is paying similarly outrageous cross connect fees.. they are charging $300 for ethernet, and $200 for DS3.

View 14 Replies View Related

CPanel Refuses To Fix Cross-site Request Forgery

Aug 3, 2009

apperently cPanel does not wish to fix a cross-site request forgery because it would be a so called feature. Maybe due the weekend someone had a drink to many

Anyways ; from The register:

Quote:

The vulnerability in cPanel is triggered by luring a user to a malicious website while logged in to the program, which is one of the most widely used web-hosting applications.

The attack is able to trick cPanel into carrying out sensitive commands by making it appear as if they came from the victim.

"If you logged in as root and you hit my website or you hit any website I control, I can do anything I want," Bailey said. "I can reset your root password, I can upgrade software, I can modify any setting I want. That's scary and that's bad."

Even more troubling, Bailey continued, was the reply he got when he notified cPanel officials of the bug. "The response I got from cPanel was we can't fix this because it's a feature. Apparently, they're worried it's going to break integration with third party billing software, so they can't fix this."

View 10 Replies View Related

Remote MySQL Server - Non Cross Cable - Same Datacenter

Jun 12, 2007

if anyone have experience with remote MySQL server setup

I have 2 servers in the same datacenter, 1 serve as web server, and 1 serve as mysql server.

would my remote MySQL server slows down my site load if it's not connected through cross cable? it's on the same datacenter though

View 4 Replies View Related

Apache :: Cross-Origin Resource Sharing Configuration

Nov 26, 2014

We have following rule in httpd-vhosts.conf and it was working all ok.

All of sudden we have found on one day that it stopped working and we did some configuration tweak with this rule but none of them worked.

During troubleshooting, last change was disabling mod_security and after that it started working again. However, next day we had again enabled mod_security to get issue replicated but found it working all ok.

Any clue for such behaviour of Apache ? Why all of sudden following working rule may get stopped working and then starts working again ?

<IfModule mod_headers.c>
SetEnvIf Origin "https://(www.)?(v1.abc.com|v1ak.abc.com|v2.asite.com)$" AccessControlAllowOrigin=$0$1
Header Set Access-Control-Allow-Origin %{AccessControlAllowOrigin}e env=AccessControlAllowOrigin
Header Set Access-Control-Allow-Credentials "true"
Header Set Access-Control-Allow-Methods "GET, POST, OPTIONS"
Header Set Access-Control-Allow-Headers "origin, content-type, accept, X-Requested-With"
Header always unset Expires
</IfModule>

OS and Apache Version details are below:

Apache Version :2.2.27(win32), OS: Windows 2008 R2, ModSecurity Rule Set ver.1.5

View 1 Replies View Related

Invalid Cross-device Link - Additional Hard Drives Linux

Mar 25, 2008

OP: Linux Centos

I just got an additional 500GB hard drive added and mounted it to /home2

There are files that are in /home1 (orginal HD) that will need to be constantly moved over to /home2 via a ftp

But i keep getting this error

550 Rename/move failure: Invalid cross-device link

Does anyone have any ideas? I tried changing permissions but no luck also tried mounting the 2nd hard drive within a directory in /home1. Still gives the error.

View 5 Replies View Related

.htaccess On IIS

Jun 3, 2008

I am using a script, on which i want to enable friendly URL, below are the instructions.

Friendly URLs Settings
Apache Settings

(please add the following lines to your
.htaccess file to turn on friendly URLs)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /hcl/friendly_url.php [L]
</IfModule>

But, issue is, i am using IIS on Windows Server.

How can i implement this?

View 11 Replies View Related

Com To Co.uk With .htaccess

Sep 7, 2008

I want a rule in .htaccess that will convert all .com addresses into .co.uk ones as I have a .com mapped to the .co.uk address for the site.

View 7 Replies View Related

.htaccess

Mar 11, 2007

I have a vds with godaddy. I uploaded my site and then uploaded .htaccess (AddHandler server-parsed .html) Then when I go to my site in browser I get this error.

Safari can’t open the page “mydomain”. The error was: “lost network connection” (NSURLErrorDomain:-1005) Please choose Report Bug to Apple from the Safari menu, note the error number, and describe what you did before you saw this message.

The thing is, I did the exact same thing on another domain with the same htaccess file and everything works fine. SSI is enabled on both.

View 1 Replies View Related

.htaccess

Oct 11, 2007

I'm currently having a problem with a site of mine. The problem is that trying to go to domain.com/subdirectory/ (with or without the trailing slash) gets a 404 error (even though the directory exists).

However, domain.com/subdirectory/file.php works fine.

When trying to figure out what is causing this, I remembered that someone who recently did some work on this site had to add something to the .htaccess file. Here's what they added:

RewriteCond $1 !.(php|ico|gif|jpg|png|css|js|htm|html|txt|zip|pdf)$
RewriteCond $1 !^$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [L]

I haven't done much with .htaccess, so I really have little idea what any of the above means or does (although I know it does something important).

So I guess my question is, could this bit of code be causing my problem? And, if so, how can it be corrected without messing up what this code was put there for in the first place?

View 1 Replies View Related

Can I Use .htaccess With IIS

Jan 24, 2007

My application is on Windows plateform and using IIS as webserver.

Can I use .htaccess to secure my directory...

View 1 Replies View Related

Htaccess

Jul 12, 2007

Code:

RewriteCond %{QUERY_STRING} ^showtopic=([^&]+)&st=0$ RewriteRule ^forum/index.php$ [url]
I get a 500 Internal Server Error when I put that in my .htaccess file. Got it from [url]

View 5 Replies View Related

.htaccess

Jul 18, 2007

htaccess file that will redirect all requests for the domain to --

https://www.

so what I want is all traffic to be secure and use the 'www'.

View 11 Replies View Related

*.* And .htaccess

Jul 10, 2007

If I do rm -f *.* I see that .htaccess is not deleted

If I do copy -f *.* /somedir .htaccess is not copied.

Why?

What should I do to represent all files including .htaccess?

View 7 Replies View Related

.htaccess

Oct 4, 2007

i have a mobile download site.. now i dont want users to directly download from my site.. i mean hotlinking..

I hav a referal thing in my .htaccess

RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]

Now there is a flashget like software for mobiles.. i want that my users are able to download using that software but the prob is that soft doesnt sends any referal info.. so in my .htaccess i want to allow that software and i am trying this

RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^.*FGet 1.0.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteCond %{HTTP_REFERER} !^[url](/)?.*$ [NC]
RewriteRule .*.(zip|avi)$ - [F,NC]

where FGet 1.0 is the HTTP_USER_AGENT send by the software, but this doesnt works.. can plz give me the right code for it

View 6 Replies View Related

Htaccess

Sep 28, 2007

I'm have a bit of a mare getting some htaccess to work.

Here's my code:
Code:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-F
RewriteRule ^([-_!*$@~:.a-zA-Z0-9]+)$ [url]

The above works on a CPanel server but i've just moved the site to a fedora core 6, with standard httpd no control panel.

This is an entry from my log files:

PHP Code:
X.X.X.X [28/Sep/2007:11:51:34 +0100] "GET /my_profile.php?username=my_profile.php HTTP/1.1" 302 349 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30)" 




For some reason it appends the my_profile.php to the end of the url, and it does it to any file in the same directory and just keeps going around in a loop, why would it do this?

View 3 Replies View Related

Redirect Old Url To New Url Using .htaccess

Jun 6, 2009

Apache redirect. I would like to point all the old site URLs to my site homepage e.g.

[url]should point to [url]

or better,

[url]should point to [url]

tell me the redirect code i need to add to my .htaccess file to make this work?

View 3 Replies View Related

Htaccess And UA Whitelist

May 30, 2009

What are the most common UAs? What I want to do is whitelist all the legit UAs and block the rest.

View 0 Replies View Related

Htaccess- Redirecting

Apr 26, 2009

I'm trying to redirect all people who go to [url]to [url]

I've got this but it doesn't do anything: (and I did verify that the .htaccess works, as

I added garbage text and tested and got an error).

Code:
Options +Indexes
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.mydomain.com/directory/$ [NC]
RewriteRule ^(.*)$ [url]

View 8 Replies View Related







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