LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


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

Rep: Reputation: 0
Lightbulb Use PHP URL processor script with Apache


Hello,

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:

Code:
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?
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:55 PM.

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