-   Linux - Networking (
-   -   Use PHP URL processor script with Apache (

remi 07-18-2004 02:44 PM

Use PHP URL processor script with Apache

Question here about Apache and PHP.

For some time, I've been maintaining my Web site, which has a lot of ServerAlias'es (can't set a VirtualHost for each since it's hosted at my provider) and RewriteRule's. It makes quite a lengthy .htaccess which is getting harder to maintain, especially when testing Web sites I'm developing.

So I would like a PHP URL processor. Something like all HTTP requests on Apache would go to a PHP script, which in turn will analyse the requested URL and give the correct URL (WITHOUT Redirect status code).

I tried the following simpler .htaccess:


RewriteEngine On

RewriteCond %{REQUEST_URI} !^/url.php [NC]
RewriteRule ^.*$ /url.php [L]

But, when the url.php script is done, obviously it sends a new request and Apache falls in the RewriteRule again, thus making a loop.

Any ideas on this?

All times are GMT -5. The time now is 11:04 PM.