Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
markopolo2002 Posted November 20, 2012 Posted November 20, 2012 Hi all, just wondering if anyone else has had any success using rewrite rules in httpd.conf file rather than having an htaccess file ... the main benefit from what I can see of doing this is to save on server resources but I've went into WHM, "Include Editor", "Pre VirtualHost Include" and pasted the contents of my htaccess file (minus the "RewriteBase /" line because that threw up errors) and now my URL's are showing "index.php" again (i.e. http://www.freewarebb.com/index.php/files/file/837-mozil ......) which leads me to believe those instructions aren't being read. Any help appreciated Thanks in advance Marko
Dmacleo Posted November 20, 2012 Posted November 20, 2012 this has worked for me <Directory /YOUR_DIRECTORY/public_html> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} .*.(jpeg|jpg|gif|png)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule . /public/404.php [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> </Directory>
MGBrose Posted November 21, 2012 Posted November 21, 2012 Hi all, just wondering if anyone else has had any success using rewrite rules in httpd.conf file rather than having an htaccess file ... the main benefit from what I can see of doing this is to save on server resources but I've went into WHM, "Include Editor", "Pre VirtualHost Include" and pasted the contents of my htaccess file (minus the "RewriteBase /" line because that threw up errors) and now my URL's are showing "index.php" again (i.e. http://www.freewarebb.com/index.php/files/file/837-mozil ......) which leads me to believe those instructions aren't being read. Any help appreciated Thanks in advance Marko I straight use .htaccess files with no major slowdowns that I notice, I think the performance/resource benefit is negligible. The major con is if you mess up something in the hosts file it can take multiple sites down instead of just one site(htaccess level).
markopolo2002 Posted November 22, 2012 Author Posted November 22, 2012 Tried your suggestion Dmacleo, but didn't work for me ... thanks anyway but decided to just go back to the htaccess method :thumbsup:
Dmacleo Posted November 22, 2012 Posted November 22, 2012 you still have to use the use htaccess options in acp you know? unchecking them causes this.
markopolo2002 Posted November 22, 2012 Author Posted November 22, 2012 Tried multiple methods, one/off, different paths, etc, nothing worked so just gave up in the end - I'd have tried further if I thought the speed and/or performance increase was significant enough to warrant it, but I doubt it would be :)
Dmacleo Posted November 22, 2012 Posted November 22, 2012 like everything it all depends on needs, some had (on cpanel) to do it using all apache versions while others had to use the specific.
.time Posted November 22, 2012 Posted November 22, 2012 You wouldn't use cPanel if you cared at all about server resources... Using httpd.conf will save you a bit but not much. If you're low on power, try swapping apache for nginx.
Royzee Posted November 22, 2012 Posted November 22, 2012 You wouldn't use cPanel if you cared at all about server resources... Using httpd.conf will save you a bit but not much. If you're low on power, try swapping apache for nginx. If you have plenty of resources, I don't see where it matters one way or another. I have a VPS with WHM and 3 cPanels ( 3 IPs flor 3 sites ) and no problems at all.
Dmacleo Posted November 22, 2012 Posted November 22, 2012 helps when hosting sites for people too. lot easier to just let them mess up their own crap.
MGBrose Posted November 26, 2012 Posted November 26, 2012 You wouldn't use cPanel if you cared at all about server resources... Using httpd.conf will save you a bit but not much. If you're low on power, try swapping apache for nginx. For WHM their are existing Nginx and Varnish Plugins to make installs take half the effort. Also the nifty thing about whm is you can disable everything and anything, so if your not using email or spamd services disable them. If your not using the internal DNS server disable it. And youll save loads on memory and processing usage. WHM isn't needed, but it makes like a hell of a lot easier.
Dmacleo Posted November 26, 2012 Posted November 26, 2012 these don't swap out apache as .time is proposing, they proxy to apache for cache purposes. but apache is still used. there is a litespeed module to replace apache for cpanel.
.time Posted November 30, 2012 Posted November 30, 2012 there is a litespeed module to replace apache for cpanel.What does litespeed do that nginx doesn't, out of curiosity? I'd rather save my money.
Dmacleo Posted November 30, 2012 Posted November 30, 2012 dunno, I never looked into it. http://applications.cpanel.net/litespeed-webserver/ iirc the free version is pretty bare but I never really looked.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.