Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old July 10th, 2001, 03:59 AM
robert.swift's Avatar
robert.swift robert.swift is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80 robert.swift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Question Using mod_rewrite to handle search bots

Hi,

I have been toying with the idea of using the mod_rewrite module and the mod_setenvif module so that when a bot comes along to do it's business it gets a set of pages back that feed it's need for specific information but when a regular user agent clicks the link from the search results they get something different.

Has anyone done this before? Am I about to embark on the stupidest project ever? I would appreciate any help and feedback.

Cheers - Robert.
__________________
Robert.

Reply With Quote
  #2  
Old July 10th, 2001, 06:56 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
First off, I assume you are talking about dynamic PHP site. Can you do search-engine-friendly with PHP using mod_rewrite? If not, just start from the scratch and do a search in this forum, I have posted related stuffs dozen times. If you do, then start here -> http://forums.devshed.com/showthrea...5113&forumid=15 and get some ideas from it. Specifically, set something like RewriteCond %{HTTP_USER_AGENT} wap [OR] . That said, you don't even need to use mod_setenvif at all.
In addition, you need to take advantage of DirectoryIndex and implement internal redirection in mod_rewrite to launch index.php for regular users and index.robot.html for robots.

>> Has anyone done this before?

Not me.

>> Am I about to embark on the stupidest project ever?

Probably not. But you need to figure out if it's worth doing it for the extra resources consuming cost.

Anyhow, do a search first, my replies regarding to mod_rewrite in this forum is more than enough to get you going.

Reply With Quote
  #3  
Old July 10th, 2001, 07:11 AM
robert.swift's Avatar
robert.swift robert.swift is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Manchester, UK
Posts: 80 robert.swift User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
freebsd,

firstly, thanks for the slap on the wrist! i do use the forum search but not this time, i will in future

ok, PHP is not the big issue for me (i use SSI for small bits) but following some advice from phreq i am exploring a new way of structuring my site to incorporate product names in the URL.

however, i want the user to be able to click http://blah/product/ and get back to a frameset with a subframe containing the dynamic search results for product but the search bot to access the same URL and get a nice load of keywords and so on.

i am not a PHP expert (in fact in am probably not even a beginner) but i guess that PHP would allow me to build a dynamic page based on user_agent?

i will look into it so expect some dumb posts in the PHP forum in the coming days

thanks again,

robert.

Reply With Quote
  #4  
Old July 13th, 2001, 12:49 PM
figini figini is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Location: Los Angeles
Posts: 5 figini User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Why don't you just set up a robots.txt file and exclude everything but a
single directory. In that directory put a index.php3 file and bam.
Your in business no.

Reply With Quote
  #5  
Old July 13th, 2001, 04:07 PM
forefront forefront is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2000
Posts: 165 forefront User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 52 sec
Reputation Power: 9
Quote:
Originally posted by figini
Why don't you just set up a robots.txt file and exclude everything but a
single directory. In that directory put a index.php3 file and bam.
Your in business no.


It is more "bam" than "in business" I'm afraid - most major search engines will not index .php* pages - only .htm* and .shtm* pages and remamber that not all robots will follow the robots.txt standard

It may be better to do a lookup on the user agent and if it matches a known bot, serve content for that bot else serve the standard website

Reply With Quote
  #6  
Old July 15th, 2001, 06:33 PM
stevetanti stevetanti is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Posts: 2 stevetanti User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I've been thinking about bots for a while, but havn't had the time yet to do more reasearch.

Since Bots and spiders don't like searching through dynamic pages (.asp/.php...) what would happen if you do this:

Have your index.html page, with a meta tag to auto-redirect to your index.php. You publish your index.html page as the main page to serach engines. In the .html page you have all the info for all the different bots and spiders to catalogue, but the users will (hopefully) seamlessly go to the .php page and not be any the wiser.

Now, my question is: Will the bots actually index the .html page, or will they automatically be redirected to the .php page? I can't use any funky server side parsing using Apachie as I'm using a shared server at my ISP. (Maybe later, I'll get a dedicated server... but for the time being...)

Is this possible? or will the bot just be redirected as quick as a wink and then balk at the .php page?

Cheers,

Steve

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Using mod_rewrite to handle search bots


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway