Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
Featured Web Site Template

Hundreds More at Free Site Templates.com!

Web Site Partners
Sponsored Links
Jet City Software
 
Whos Here ?
Reflects user activity within the last 5 minutes
Moderator(s): Prowler, jcokos
Member Message

spower
Joined: May 03, 2005
# Posts: 5

View the profile for spower Send spower a private message

Posted: 2005-May-03 22:22
Edit Message Delete Message Reply to this message

I am in the process of retooling a website to be more search engine friendly. My question is: Is mod_rewrite for apache still worth all the hassle and overhead in order to garner more search relevence?

Currently we have
www.somedomain/page.php?var1=1&var2=2&var3=3

with mod_rewrite I have been able to rewrite this as
www.somedomain/1/2/3.html
but it seems to require a lot of overhead to do this

for even more overhead we could change the url further to
www.somedomain/computer/laptop/Presario-R3000
using an external rewrite map script to pull the info from a database.

how much would the rewritten URLs really help?
I have read wildly contrasting reports on this, so what is your opinion / experience with this?

[ Message was edited by: bhartzer 05/10/2005 11:04 am ]





lizardz
Joined: Nov 12, 2004
# Posts: 1394

View the profile for lizardz Send lizardz a private message

Posted: 2005-May-04 00:36
Edit Message Delete Message Reply to this message

It helps a lot, who said it didn't? I'd ignore anyone who says search engine friendly urls aren't worth it, at least if you're interested in getting good traffic from natural serps.

Clean urls also look nicer. How much overhead are you talking about, is this something you've actually tested, or is it something you just read somewhere? In other words, can you actually see a difference in apache's resource consumption levels in an objective way? Might be relevant if you're getting 1 million hits a day I guess, or if you have a really bad low end web server.



Silv
Joined: Aug 10, 1999
# Posts: 1668

View the profile for Silv Send Silv a private message

Posted: 2005-May-05 21:12
Edit Message Delete Message Reply to this message

There's definitely overhead to mod_rewrite - but it the rules are written correctly, it's minor, especially on a decent webserver. There's quite a bit of information out there to the contrary -- but keep in mind how much computers and processiing power has changed over the last two years.

Yes, mod_rewrite under Apache 1.3 on an "average" webserver from a few years ago could cause problems, but the average webserver from a few years ago was about 1GHz. Now you'll typically find servers running @ 2.4GHz at a minimum, with mid-range boxes running at about 2.8 to 3.2GHz. Dual machines aren' uncommon, and the prices on those are coming down too. We've been going over to all dual machines, and it's certainly not costing us as much as it would have years ago.

All and all, mod_rewrite shouldn't be a problem for a modern webserver to handle; if it is - something isn't set up correctly.






spower
Joined: May 03, 2005
# Posts: 5

View the profile for spower Send spower a private message

Posted: 2005-May-05 21:48
Edit Message Delete Message Reply to this message

Thanks for the advise, I think I will go ahead with mod_rewrite. And I think you're right the overhead was probably only noticable due to the age of the server we are testing on.



vanachte
Joined: Feb 10, 2004
# Posts: 404

View the profile for vanachte Send vanachte a private message

Posted: 2005-May-06 00:33
Edit Message Delete Message Reply to this message

It may be too late for my input, but good idea, go ahead with it!

When you add those extraneous characters it doesnt help anything - re-writing as per your example, with the ../computer/laptop.. is the best move.



spower
Joined: May 03, 2005
# Posts: 5

View the profile for spower Send spower a private message

Posted: 2005-May-06 00:40
Edit Message Delete Message Reply to this message

I'd love to do it that way, but I'm having some trouble with the external map script to draw the info from the DB.
Know any good resources on Rewrite map programs?



Prowler
Staff
Joined: Aug 14, 2000
# Posts: 1788

View the profile for Prowler Send Prowler a private message

Posted: 2005-May-09 11:55
Edit Message Delete Message Reply to this message

If you have reasonable in-house developer resources, why not try the magical bullet - 404 error trap which triggers a script which in turn fetches the results from the database ?
This method puts out very search-engine friendly URLs and takes care of any possibility of 'Page not found' result.

Admittedly, the server overhead is a bit high. But as others in this thread have pointed out, it is academic to worry about the server overhead for modern high power servers - provided your codes are clean and you torture test the whole application before being deployed in the production server.





spower
Joined: May 03, 2005
# Posts: 5

View the profile for spower Send spower a private message

Posted: 2005-May-10 17:15
Edit Message Delete Message Reply to this message

Maybe this question is a bit naive, but wouldn't a 404 error cause the search engine to not index the page?



lizardz
Joined: Nov 12, 2004
# Posts: 1394

View the profile for lizardz Send lizardz a private message

Posted: 2005-May-11 00:22
Edit Message Delete Message Reply to this message

"but I'm having some trouble with the external map script to draw the info from the DB."

Does the map load on every page request? If it's running in httpd.conf? I can't remember, but I think the httpd.conf is loaded once when apache starts, which is what makes it more efficient.

This could be wrong, but if it's right, doing live updates of the map script wouldn't do you any good anyway. If it's wrong, it would work, with the overhead. You could run a cronjob to create the map once a day or something, to a static file, but I assume that file would still have to reload with an apache restart.

In htaccess this wouldn't be the case of course, that is delivered when the page is requested, with some more overhead I guess.

If you ran the mod rewrite through htaccess, you could simply regenerate the file x number of times per day with cron, and the htaccess file would grab the latest version without forcing a repeated db query to generate it.




Prowler
Staff
Joined: Aug 14, 2000
# Posts: 1788

View the profile for Prowler Send Prowler a private message

Posted: 2005-May-11 07:10
Edit Message Delete Message Reply to this message

404 error trap is a powerful tool in the right hands. It is triggered when the server finds that there is no such file.

Instead of delivering the routine 404 error, the server invokes the script which writes out a standard 200 server status code header and follows the instructions further down. It means that there is no 404 server status code returned to the visitor's browser or the search engine spider.

Many successful webapplications use this technique to deliver contents on the fly.



g1smd
Staff
Joined: Jul 28, 2002
# Posts: 10418

View the profile for g1smd Send g1smd a private message

Posted: 2005-May-11 20:44
Edit Message Delete Message Reply to this message


In the wrong hands, that method is a total disaster.....

Be very very careful.



spower
Joined: May 03, 2005
# Posts: 5

View the profile for spower Send spower a private message

Posted: 2005-May-13 19:20
Edit Message Delete Message Reply to this message

"If you ran the mod rewrite through htaccess, you could simply regenerate the file x number of times per day with cron, and the htaccess file would grab the latest version without forcing a repeated db query to generate it. "

Unfortunately it turns out rewritemaps aren't allowed in a .htaccess file. Otherwise that would be a perfect solution.




lizardz
Joined: Nov 12, 2004
# Posts: 1394

View the profile for lizardz Send lizardz a private message

Posted: 2005-May-13 21:21
Edit Message Delete Message Reply to this message

Oh, that's too bad, I wasn't sure about that. In that case I think you'd need to restart apache to load the new rewrite map no matter what, which would be ok on a relatively low traffic site, but not on a nigh traffic one. Depends on how much the links change day to day I guess.


You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
  1. You have not yet logged in, or registered properly as a member
  2. You are a member, but no longer have posting rights.
  3. This is a private forum, for which you do not have permissions.

If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

If you cannot find this message, click here to Re-Send it.

If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

New posts Forum is locked
© 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions