Forum Moderators: open

Message Too Old, No Replies

.htaccess how big?

when does it become an issue?

         

soapystar

1:31 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i need to use htaccess for about 200 urls. I'm wondering if there's such a thing as an acceptable size for the file and if there's any performance issues in having a lot of urls specified for 301 redirect from it? How would google look at a large number of redirects like this? albeit 301s!

TeofenGL

5:12 pm on Feb 6, 2003 (gmt 0)

10+ Year Member




google never actually loads .htaccess files - apache uses them to process each specific request and send appropriate reply/redirection.

all in all, this can be very fast, because it's local...

just remember that all .htaccess files at the current level and above are processed for each individual request - e.g.,

if you have
/pages/category/timeframe/items/page.xxx

the following .htaccess files will be looked at, in the follwing order:
/.htaccess
/pages/.htaccess
/pages/category/.htaccess
/pages/category/timeframe/.htaccess
/pages/category/timeframe/items/.htaccess

for ANY request within that directory.

hth

jdMorgan

5:21 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



soapystar,

In addition to what TeofenGL says, remember that you may not need a redirect for every URL; If they have some common pattern, one redirect can be used to handle multiple URLs. For example, you can redirect all files in a subdirectory with one redirect.

My .htaccess has hit 26kB in the past, and it made no visible difference in server performance.

Jim

andreasfriedrich

5:25 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld [webmasterworld.com] TeofenGL.

Be sure to read Marcia`s WebmasterWorld Welcome and Guide to the Basics [webmasterworld.com] post.

Nice explanation of how htaccess files work and a good thing to keep in mind. Although most people have no choice but to use htaccess files for a lack of root access. Using RewriteRule [httpd.apache.org]s in htaccess is a lot slower than in htaccess files as well. So if you have root access disable htaccess file altogether.

Having 200 Redirect [httpd.apache.org] directives shouldn´t be a problem.

Andreas

TeofenGL

5:28 pm on Feb 6, 2003 (gmt 0)

10+ Year Member



tx

soapystar

5:29 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



thanks thats interesting. But as each url redirects to a unique url i need to specify each one. When you say all files in a subdirectory can redirect with one redirect, do you mean if they are going to the same url? if not then i'm not sure what you mean. Does htaccess count as a server level redirects? in other words is it unlikely to be seen a spamming as meta refresh would?

soapystar

5:37 pm on Feb 6, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



if i might change the destination sometime in the future would i need to specify
redirect 302
rather than
redirect 301
as i have now?

Thanks for the help.