Reply to Re: Simpler urls

Your name:

Reply:


Posted by Rik on 07/17/07 01:37

>>> Hence, the links:
>>>
>>> http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
>>> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
>> Ack... regular expressions!!!!!!!!!
>> Anyone interested in a little consulting to get me up to speed on a
>> basic framework for this system, please email. I've got a couple web
>> sites that could use this upgrade but it's beyond me for now to even
>> get a basic effect to take hold with .htaccess on the first one I tried.
>
> I'd suggest you try asking in alt.apache.configuration. That's where
> those gurus hang out.
>
> There are a few here with knowledge about how to do it, but many more
> over there.

Well, if htaccess isn't your thing, there's one other pretty easy brute
force thing to do:

Simple htaccess:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]

This will throw requests for non-existant files or folders to your
index.php. Search the $_SERVER['REQUEST_URI'] for the original request,
and have fun in PHP instead of .htaccess. Exploding, loops, databases, all
at your disposal.

If the request doesn't make sense, please throw out a not-found header in
PHP, search engines generally appreciate that. And realise your server
will have a lot more heavier load in this setup, as the webserver itself
isn't responsible anymore for it's own fast returns, but everything goes
through PHP.

HTH
--
Rik Wasmus

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация