Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 07-18-2004, 01:44 PM   #1
LQ Newbie
Registered: May 2003
Distribution: Red Hat Linux 9.0
Posts: 16

Rep: Reputation: 0
Lightbulb 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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting the url with PHP linux_pioneer Linux - General 2 06-20-2004 02:08 PM
Can you verify a url with php? digitalgravy Programming 4 03-01-2004 01:38 PM
Apache/PHP phpshell script ANU Linux - Software 0 12-03-2003 06:19 PM
apache problems with a Php script kudos Linux - Software 2 09-23-2003 04:54 PM
PHP Url? HappyDude Programming 2 09-20-2003 04:20 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration