RE: [PHP] mod rewrite urls

2004-08-12 Thread Ed Lazor
It might be easier to do something like

Files view 
ForceType application/x-httpd-php 
/Files

Then you could have your url

http://mycompany.com/view/10/?a=1b=2c=3


You can do the same thing with / but the scope ends up pretty big and
creates a lot of extra unnecessary processing.

-Ed


 -Original Message-
 From: Maris [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 11, 2004 11:43 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP] mod rewrite urls
 
 Hi,
 
 struggling with the following:
 
 I have an URL
 
 www.mycompany.com/index.php?id=10a=1b=2c=3
 
 What I want to do is using mod_rewrite have
 
 www.mycompany.com/10/?a=1b=2c=3
 
 Have tried the following rewrite rules in .htaccess
 
 RewriteEngine on
 
 RewriteCond%{REQUEST_FILENAME}  !-d
 RewriteCond%{REQUEST_FILENAME}  !-f
 RewriteCond  %{REQUEST_URI} ^/([0-9]*)/\?(.+)$
 RewriteRule  ^([0-9]*)/\?(.+)$ get.php?id=$1$2  [L]
 
 But this doesnt work, something's wrong with ?, because if
 I put in rule any alphabetical character, for example Z then
 www.mycompany.com/10/Za=1b=2c=3 works fine
 
 Thanks,
 Maris
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] mod rewrite urls

2004-08-12 Thread Jay Blanchard
[snip]
struggling with the following:

I have an URL

www.mycompany.com/index.php?id=10a=1b=2c=3

What I want to do is using mod_rewrite have

www.mycompany.com/10/?a=1b=2c=3

Have tried the following rewrite rules in .htaccess

RewriteEngine on

RewriteCond%{REQUEST_FILENAME}  !-d
RewriteCond%{REQUEST_FILENAME}  !-f
RewriteCond  %{REQUEST_URI} ^/([0-9]*)/\?(.+)$
RewriteRule  ^([0-9]*)/\?(.+)$ get.php?id=$1$2  [L]

But this doesnt work, something's wrong with ?, because if
I put in rule any alphabetical character, for example Z then
www.mycompany.com/10/Za=1b=2c=3 works fine
[/snip]

a. Have you sent this to an Apache list?
2. I just almost cannot bring myself to say it, but this relates to PHP
how?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mod rewrite urls

2004-08-12 Thread raditha dissanayake
Jay Blanchard wrote:
2. I just almost cannot bring myself to say it, but this relates to PHP
how?
 

oh boy, you are going to get a heap of hate mail for saying that.

--
Raditha Dissanayake.

http://www.radinks.com/sftp/ | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 128 KB | with progress bar.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mod rewrite urls

2004-08-12 Thread John Nichel
Jay Blanchard wrote:
snip
a. Have you sent this to an Apache list?
2. I just almost cannot bring myself to say it, but this relates to PHP
how?
Didn't you get the memo?  To be PC, we now have to answer all questions 
releated to php or not. ;)

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] mod rewrite urls

2004-08-12 Thread Jason Wong
On Thursday 12 August 2004 21:37, John Nichel wrote:
 Jay Blanchard wrote:
 snip

  a. Have you sent this to an Apache list?
  2. I just almost cannot bring myself to say it, but this relates to PHP
  how?

 Didn't you get the memo?  To be PC, we now have to answer all questions
 releated to php or not. ;)

Even if that means copy-and-pasting from whatever manual/website contains the 
answer for those people to busy to look it up for themselves?

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
f u cn rd ths, u r prbbly a lsy spllr.
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] mod rewrite urls

2004-08-12 Thread John Nichel
Jason Wong wrote:
On Thursday 12 August 2004 21:37, John Nichel wrote:
Jay Blanchard wrote:
snip
a. Have you sent this to an Apache list?
2. I just almost cannot bring myself to say it, but this relates to PHP
how?
Didn't you get the memo?  To be PC, we now have to answer all questions
releated to php or not. ;)

Even if that means copy-and-pasting from whatever manual/website contains the 
answer for those people to busy to look it up for themselves?

That may not be enough.  You may also have to write the code for them.  ;)
--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
[EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php