is my .htacces slowing down my site?

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
Code:
# Lines That should already be in your .htacess
<Files "config.php">
Order Allow,Deny
Deny from All
</Files>
<Files "common.php">
Order Allow,Deny
Deny from All
</Files>

DirectoryIndex portal.php index.php index.html

# You may need to un-comment the following line
# Options +FollowSymlinks
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO ADD THE WWW PREFIXE REDIRECTION

#####################################################
# PHPBB SEO REWRITE RULES - ADVANCED
#####################################################
# AUTHOR : dcz www.phpbb-seo.com
# STARTED : 01/2006
#################################
# FORUMS PAGES
###############
# FORUM INDEX REWRITERULE WOULD STAND HERE IF USED. 'forum' REQUIRES TO BE SET AS FORUM INDEX
# RewriteRule ^forum\.html$ /index.php [QSA,L,NC]
# FORUM
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/?(page([0-9]+)\.html)?$ /viewforum.php?f=$1&start=$3 [QSA,L,NC]
# TOPIC WITH VIRTUAL FOLDER
RewriteRule ^[a-z0-9_-]*-f([0-9]+)/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?f=$1&t=$2&start=$4 [QSA,L,NC]
# GLOBAL ANNOUNCES WITH VIRTUAL FOLDER
RewriteRule ^announces/[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?t=$1&start=$3 [QSA,L,NC]
# TOPIC WITHOUT FORUM ID & DELIM
RewriteRule ^([a-z0-9_-]*)/?[a-z0-9_-]*-t([0-9]+)(-([0-9]+))?\.html$ /viewtopic.php?forum_uri=$1&t=$2&start=$4 [QSA,L,NC]
# PROFILES THROUGH USERNAME
RewriteRule ^member/([^/]+)/?$ /memberlist.php?mode=viewprofile&un=$1 [QSA,L,NC]
# USER MESSAGES THROUGH USERNAME
RewriteRule ^member/([^/]+)/(topics|posts)/?(page([0-9]+)\.html)?$ /search.php?author=$1&sr=$2&start=$4 [QSA,L,NC]
# GROUPS ADVANCED
RewriteRule ^[a-z0-9_-]*-g([0-9]+)(-([0-9]+))?\.html$ /memberlist.php?mode=group&g=$1&start=$3 [QSA,L,NC]
# POST
RewriteRule ^post([0-9]+)\.html$ /viewtopic.php?p=$1 [QSA,L,NC]
# ACTIVE TOPICS
RewriteRule ^active-topics(-([0-9]+))?\.html$ /search.php?search_id=active_topics&start=$2&sr=topics [QSA,L,NC]
# UNANSWERED TOPICS
RewriteRule ^unanswered(-([0-9]+))?\.html$ /search.php?search_id=unanswered&start=$2&sr=topics [QSA,L,NC]
# NEW POSTS
RewriteRule ^newposts(-([0-9]+))?\.html$ /search.php?search_id=newposts&start=$2&sr=topics [QSA,L,NC]
# THE TEAM
RewriteRule ^the-team\.html$ /memberlist.php?mode=leaders [QSA,L,NC]
# HERE IS A GOOD PLACE TO ADD OTHER PHPBB RELATED REWRITERULES

# FORUM WITHOUT ID & DELIM
# THESE FOUR LINES MUST BE LOCATED AT THE END OF YOUR HTACCESS TO WORK PROPERLY
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([a-z0-9_-]+)/?(page([0-9]+)\.html)?$ /viewforum.php?forum_uri=$1&start=$3 [QSA,L,NC]
# END PHPBB PAGES
#####################################################

It seems like something is slowing my main site http://jagf.net down but if you go to http://jagf.net/pixel it is much faster.
 

VPmase

New Member
Messages
914
Reaction score
1
Points
0
The portal has to load a lot more than the pixel page does. There are so many MySQL queires and tables in the Portal that it does seem like it lags.
 
Last edited:

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
It never done it before. It just started on friday. I have never seen it in this way and I haven't changed anything.
 

woiwky

New Member
Messages
390
Reaction score
0
Points
0
It's definitely not the .htaccess file. If that .htaccess is in the root, it applies to all subdirectories(which includes /pixel). Furthermore it seems that the hang occurs after the server response, which means it's long after the server analyzes .htaccess.

I'm not entirely sure what's causing it, but the large amount of dynamic elements on the page certainly don't help. Especially since some scripts are hosted remotely, meaning that your page will load slower if the other servers are being taxed. Whenever possible, you should save copies of remote files on your server for efficiency as well as a number of other reasons.

Additionally, your php may be doing some things inefficiently. I would recommend adding code to calculate the complete execution time and outputting it to see how much of the drag php is responsible for. This is quite easy to do: (the output will be in seconds)

PHP:
<?php
$starttime = microtime(true);

//all your php code should be here

print 'Execution time: ' . (microtime(true) - $starttime);
?>

It's important that you place the initialization of $starttime before all other code, including include() statements.

Generally, php scripts shouldn't be executing for longer than 0.15 seconds, but this varies of course. Considering how slow this page is loading, I would say that anything under 1.5 seconds means that php is not the main cause. But if it's over 0.8 seconds, it definitely still needs to be optimized.
 

phpasks

New Member
Messages
145
Reaction score
0
Points
0
May be your serve slow than effect on your site.

No. of parameter effect on site slowing down.

DB Query also one part of site slowing.

Otherwise You will raised a ticket & You tell to server guy my sites slowing,
Before friday my site was ruuning very well,
But currently my site is not running fast.
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
eh I just removed the <div>'s around an ad and the site loads faster.
 
Top