Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-26 Thread Ashley Sheridan
On Mon, 2009-10-26 at 07:46 +0530, kranthi wrote: > you have to type the relative path to your document root for every URI) > > seems you are looking for > http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond I don't think that will do what he wants. Consider the following two exa

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread kranthi
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#RewriteCond

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread דניאל דנון
As Ashley said, its the wrong way to approach this problem. I suggest you read about "base href". (http://."; /> ) it is a HTML tag. On Sun, Oct 25, 2009 at 6:51 PM, Rob Gould wrote: > Isn't there a way to tell the Rewrite rule to skip anything found in a js > or images subfolder? > > > >

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread Ashley Sheridan
On Sun, 2009-10-25 at 12:51 -0400, Rob Gould wrote: > Isn't there a way to tell the Rewrite rule to skip anything found in a > js or images subfolder? > > > On Oct 25, 2009, at 12:26 PM, Ashley Sheridan wrote: > > > On Sun, 2009-10-25 at 11:04 -0400, Rob Gould wrote: > >> > >> I'm trying to f

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread Rob Gould
Isn't there a way to tell the Rewrite rule to skip anything found in a js or images subfolder? On Oct 25, 2009, at 12:26 PM, Ashley Sheridan wrote: On Sun, 2009-10-25 at 11:04 -0400, Rob Gould wrote: I'm trying to follow the RewriteRule docs to make it so that: http://benchwarmersports.

Re: [PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread Ashley Sheridan
On Sun, 2009-10-25 at 11:04 -0400, Rob Gould wrote: > I'm trying to follow the RewriteRule docs to make it so that: > > http://benchwarmersports.com/packages/super-bowl-xliv/1 > > can be entered into the web-browser, and it transforms into: > > http://benchwarmersports.com/packages.php?title=

[PHP] RewriteRule to hide PHP vars in URL

2009-10-25 Thread Rob Gould
I'm trying to follow the RewriteRule docs to make it so that: http://benchwarmersports.com/packages/super-bowl-xliv/1 can be entered into the web-browser, and it transforms into: http://benchwarmersports.com/packages.php?title=super-bowl-xliv&eventid=1 The good news is that it does transform

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
You are absoloodle right about that. Although I'm not sure about their greediness, which might be different. I prefer the '{0,}' in my rewrite rules because I usually define the max-length to prevent code injection. eg. # to make sure only the first 8 chars get passed on to PHP Re

Re: [PHP] RewriteRule

2008-10-13 Thread Per Jessen
Yeti wrote: >> What's the point of using '{0,}' instead '*' ? > > Well the thing is that with the {0,} more REQUEST_URIs are valid: > eg. > /blog > /blog/ > /blog/17 > /blog/17/ > /blog/17/0 > /blog/17/0/ Yeti, I must be slow today - I still can't see the difference between '{0,}' (= 0 or m

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
>Jessen wrote: >RewriteRule ^blog/([^/]+)/([^/]+)/ blog.php?getparam1=$1&getparam2=$2 >[NC,QSA,L] Of course, your truely does what the OP asked for + it cuts of all strings after the last / /A yeti -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsu

Re: [PHP] RewriteRule

2008-10-13 Thread Yeti
> What's the point of using '{0,}' instead '*' ? Well the thing is that with the {0,} more REQUEST_URIs are valid: eg. /blog /blog/ /blog/17 /blog/17/ /blog/17/0 /blog/17/0/ AND additional characters get ignored (like when it is necessary to reload content with javascript, due to caching issues)

Re: [PHP] RewriteRule

2008-10-12 Thread Per Jessen
Yeti wrote: > RewriteRule ^blog[/]{0,}([^/]{0,})[/]{0,}([^/]{0,})[/]{0,}.*$ > blog.php?getparam1=$1&getparam2=$2 [NC,QSA,L] What's the point of using '{0,}' instead '*' ? I think I would have written something like this: # http://www.domain.com/blog/1/2/ RewriteRule ^blog/([^/]+)/([^/]+)/ blog

Re: [PHP] RewriteRule

2008-10-12 Thread Yeti
#.htaccess RewriteEngine on RewriteBase / #Apache recurses into htaccess 3 times so we have to make sure not to overwrite an already processed rule RewriteCond %{REQUEST_URI} !^.*(\.php|\.css|\.js|\.html|\.ico|robots\.txt).*$ #The rewrite condition below can be used to pass through GET parameters

Re: [PHP] RewriteRule

2008-10-12 Thread Daniel Brown
On Sun, Oct 12, 2008 at 12:57 PM, Ron Piggott <[EMAIL PROTECTED]> wrote: > I am needing to pass 2 variables in a script I am writing. Does anyone > know how to do this? > > http://www.domain.com/blog/1/2/ > > I know how to pass 1; I have no idea how to write a rewrite rule to pass > the 2 as well.

[PHP] RewriteRule

2008-10-12 Thread Ron Piggott
I am needing to pass 2 variables in a script I am writing. Does anyone know how to do this? http://www.domain.com/blog/1/2/ I know how to pass 1; I have no idea how to write a rewrite rule to pass the 2 as well. Thanks, Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP] RewriteRule help

2008-03-01 Thread Per Jessen
Shelley wrote: > Hi all, > > Anybody knows what apache RewriteRule to use if I want url: > http://www.aaa.comm/user// > be rewritten as: > http://www.aaa.comm/user/index.php// > RewriteRule /user/([^/]+)/ /user/index.php/$1/ /Per Jessen, Zürich -- PHP General Mailing List (http:/

Re: [PHP] RewriteRule help

2008-03-01 Thread Greg Donald
On 3/1/08, Shelley <[EMAIL PROTECTED]> wrote: > Anybody knows what apache RewriteRule to use if I want url: > http://www.aaa.comm/user// > be rewritten as: > http://www.aaa.comm/user/index.php// RewriteRule ^user/([-a-zA-Z0-9]+)$ /index.php?user=$1 [NC,L] -- Greg Donald http

Re: [PHP] RewriteRule help

2008-03-01 Thread Richard Heyes
Anybody knows what apache RewriteRule to use if I want url: http://www.aaa.comm/user// be rewritten as: http://www.aaa.comm/user/index.php// It is not a php question. But now Im not in apache list and it's a little hurry. If possible you could: 1. Make "user" a php script 2. Use the

[PHP] RewriteRule help

2008-03-01 Thread Shelley
Hi all, Anybody knows what apache RewriteRule to use if I want url: http://www.aaa.comm/user// be rewritten as: http://www.aaa.comm/user/index.php// It is not a php question. But now Im not in apache list and it's a little hurry. Any help, thank you very much. -- Cheers, Shelley --

[PHP] RewriteRule REGEX ?

2004-01-24 Thread Monty
My server runs Apache 2.0. I am trying to do a simple URL rewrite so that old URLs will map to our new style of URLS... From This: articles.php?id=999 To This:articles/999 In the .htaccess file for the htdocs folder that contains the web files, I put the following: RewriteEngine