homepage Welcome to WebmasterWorld Guest from 54.163.91.250
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Mod_rewrite indexing
Mod_rewrite indexing
planbeta




msg:1507293
 11:09 am on May 7, 2003 (gmt 0)

Just been reading about using mod_rewrite for making dynamic ursl appear static eg.

[myurl.com...] can be
[myurl.com...]

Do the search engines know your site is is using mod_rewrite and will it index the pages fine?

Cheers

Chris

 

dmorison




msg:1507294
 11:43 am on May 7, 2003 (gmt 0)

Hi planbeta,

Short answer - no, it is not possible for a search engine to tell that you are using mod_rewrite.

planbeta




msg:1507295
 11:54 am on May 7, 2003 (gmt 0)

Thanks a lot - puts my mind at ease!

Cheers

Chris

planbeta




msg:1507296
 2:07 pm on May 7, 2003 (gmt 0)

Hi Just to check, using this:

RewriteEngine on
Options +FollowSymLinks  
RewriteRule .*\.html$ keywords.php  

should mean the 'redirect' will be invisible to the SE's?

Thanks

Chris

jdMorgan




msg:1507297
 2:17 pm on May 7, 2003 (gmt 0)

Planbeta,

I'd suggest using

RewriteEngine on
Options +FollowSymLinks
RewriteRule \.html$ /keywords.php [L]

The [L] flag stops further rewriting, which is usually the desired case, and there is no need to start an unachored pattern with ".*"

As long as you use a local path as the target of the rewrite, and do not use the [R] flag, the rewrite will be transparent to all user-agents.

Jim

planbeta




msg:1507298
 2:56 pm on May 7, 2003 (gmt 0)

Many thanks jdMorgan :)

planbeta




msg:1507299
 6:26 pm on May 7, 2003 (gmt 0)

These rewrite rules are mind bending.

Does anyone know how I could write a rule so that

when this is requested:
variablename.pl

this is served:
cgi-bin/search.pl?q=variablename

I can't for the life of me figure it out.

Cheers

Chris

jdMorgan




msg:1507300
 6:36 pm on May 7, 2003 (gmt 0)

Chris,

Have you done your homework? - Introduction to mod_rewrite [webmasterworld.com]

For use in .htaccess:

RewriteRule ^(.*)\.pl$ /cgi-bin/search.pl?q=$1 [L]

Jim

planbeta




msg:1507301
 6:48 pm on May 7, 2003 (gmt 0)

Thanks for the link - very good post! Cheers Jim

Chris

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved