some examples here:
http://wiki.apache.org/httpd/RewriteCond


RewriteCond %{HTTP_HOST}   ^www\.domain\.com [NC]
RewriteCond %{HTTP_HOST}   ^domain\.com [NC]
RewriteRule ^(.*)$ /browse/locations/$1   [R=permanent,QSA,L]


On Thu, May 24, 2012 at 3:24 PM, Gunter Sammet <[email protected]> wrote:
> Can you please give me a few examples how that would work. I'm a bit time
> pressed and I haven't done too much with rewrite.
> Thanks,
>
> Gunter
>
>
>
> On Thu, May 24, 2012 at 1:01 PM, Oscar Merida <[email protected]> wrote:
>>
>> you need to use RewriteCond to detect the domains and paths for
>> applying some rules only to matches.
>>
>>
>> On Thu, May 24, 2012 at 1:53 PM, Gunter Sammet <[email protected]>
>> wrote:
>> > Hi all:
>> > I'm trying to modify my rewrite rule to meet a few new conditions.
>> > Currently I have:
>> >
>> > RewriteEngine On
>> > RewriteCond %{REQUEST_FILENAME} !-f
>> > RewriteCond %{REQUEST_FILENAME} !-d
>> > RewriteRule ^(.*)$ index.php/$1 [L]
>> >
>> > New rules that need to be matched:
>> >
>> > Requests to main url (www.domain.com, domain.com,
>> > www.domain.com/index.php,
>> > domain.com/index.php) need to be redirected to
>> >
>> > domain.com/browse/locations
>> >
>> > The following request URLs (with or without www) are OK:
>> >    domain.com/browse/locations (plus all URLs below browse/locations.
>> > E.g.
>> > /browse/locations/detailPage/browse_locations/process_action/search/lp_id/2090)
>> >    domain.com/account (plus all URLs below)
>> >    domain.com/authentication (plus all URLs below)
>> >
>> > Every other request should be redirected to newdomain.com
>> >
>> > Any help would be appreciated!
>> > Thanks,
>> >
>> > Gunter
>>
>>
>>
>> --
>> Oscar Merida
>> * http://OscarM.org - random thoughts on my blog
>> * http://SoccerBlogs.net - your daily soccer feed
>> * http://FutBoliviano.com - bolivian soccer, futbol de altura
>
>



-- 
Oscar Merida
* http://OscarM.org - random thoughts on my blog
* http://SoccerBlogs.net - your daily soccer feed
* http://FutBoliviano.com - bolivian soccer, futbol de altura

--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to