Forum Moderators: phranque

Message Too Old, No Replies

Could this work as a mod-rewrite alternative in PHP?

         

dualfragment

2:25 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



Let me give a quick example.

[webmasterworld.com...]
[webmasterworld.com...]

Now, if you click both links, you get the same page. Could you possibly use this method to do mod-rewriting, and to a search engine, the index.htm would just appear to be a directory?

In PHP, all you would have to do would be to get the URL and separate out the stuff past the actual filename (index.htm, in this example) to do what you want. This could effectively make dynamic content appear to be static.

Would it work?

sitz

2:37 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



If you're using PHP, then this should Just Work(tm); no mod_rewrite needed. Appending extra pathing info onto the URL results in that data being passed to the PHP script in the $_SERVER["PATH_INFO"] variable.

dualfragment

12:25 am on Mar 29, 2005 (gmt 0)

10+ Year Member



The question is whether or not Google and other search engines will spider and index the pages. Any input?

sitz

3:55 am on Mar 29, 2005 (gmt 0)

10+ Year Member



I should /think/ so, but I don't claim to be a search-engine wonk; I'm an Apache wonk. =) Theoretically, Google and the other search engines wouldn't care, since they wouldn't have an easy way to determine whether that URL was static or dynamic. As an added bonus, that URL (lacking any '?' characters) would also be cacheable; generally a good thing (just be aware of it, and build your cache-control headers accordingly). Take care that there's no user-specific customizations on that page (things that would be specific to a particular user), since that + caching == bad.