Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted November 20, 201212 yr 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
November 20, 201212 yr 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>
November 21, 201212 yr 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).
November 22, 201212 yr Author Tried your suggestion Dmacleo, but didn't work for me ... thanks anyway but decided to just go back to the htaccess method :thumbsup:
November 22, 201212 yr you still have to use the use htaccess options in acp you know? unchecking them causes this.
November 22, 201212 yr Author 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 :)
November 22, 201212 yr 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.
November 22, 201212 yr 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.
November 22, 201212 yr 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.
November 22, 201212 yr helps when hosting sites for people too. lot easier to just let them mess up their own crap.
November 26, 201212 yr 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.
November 26, 201212 yr 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.
November 30, 201212 yr 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.
November 30, 201212 yr dunno, I never looked into it. http://applications.cpanel.net/litespeed-webserver/ iirc the free version is pretty bare but I never really looked.
Archived
This topic is now archived and is closed to further replies.