Welcome to WebmasterWorld Guest from 22.214.171.124
I recently received word from them that my account was using too much cpu on the server, but its almost impossible for me to troubleshoot.
Some recent changes I made were an increase in advertising which has resulted in a usage spike and editing the root level .htaccess to include 50 new redirects.
I obviously realize the cpu usage could relate to many things, but I'm trying to rule out the .htaccess scheme as the culprit.
I'm writing redirects that look like:
redirect 301 website.com/shortAddy [website.com...]
I figured it would be easier to edit redirects in a single centralized location at the root. There is no such directory as "shortAddy", I'm just trying to simplify some url based shortcuts to particular forum sections.
Is my approach clobbering the server or is it safe? Would it be more optimal for me to create a directory called website.com/shortAddy and put a .htaccess or a php page with a 301 redirect in that? Its somewhat more work but feasible.
However if you could use a short address like
where nnn is the number you want to carry over, you could do this in a single line of code (using RewriteRule instead of Redirect) for all of the redirects.
Even better would be to use a rewrite, so that users continue to see the shorter URL, not be redirected to the long one.
I'm redirecting /a to ?f=3, /b to ?f=6, /c to ?f=7, /d to ?f=9, /e to ?f=12 and so on. I'm not directing 50 /dirNames to just 1 forum id. I'm directing 50 directing 50 /dirNames to 50 unique forum id's.
Or are you just saying one line of code per rewrite rule?
It would be possible if the URL
matched the internal path
It is important that the URL either contains something unique (the /s/ bit), or is always digits
so that a simple pattern like
can match those requests.