Questions about my .htaccess |
[eluser]skunkbad[/eluser]
Last night I decided that I'd take the file extension off of the pages on my website. I wanted to use 301 redirects for each of these pages, and have successfully done so, but wondering about the L on each line 31 through 41, and if the whole .htaccess file looks OK or not. Everything works, except the host has been complaining about CPU and memory usage. Trying not to leave any stones uncovered. Code: # Turn on URL rewriting
[eluser]Phil Sturgeon[/eluser]
Quote:# Turn on URL rewriting or Quote:# Turn on URL rewriting
[eluser]skunkbad[/eluser]
Phil, thanks for the 2 examples. Do you think my version would cause the server to use more CPU or memory?
[eluser]Phil Sturgeon[/eluser]
Generally speaking more rules means more memory. Obviously a few simple rules will be quicker than a really damn complicated rule, but in this example it should be quicker. If you are really worried about CPU and memory useage then you really should put these rules into Apache config as that is loaded into memory once and used every time whereas .htaccess is read and parsed on each request.
[eluser]skunkbad[/eluser]
For whatever reason, neither of the code examples shown would work. They just resulted in 404 errors if I tried to go to a page and used the .php file extension. |
Welcome Guest, Not a member yet? Register Sign In |