Discussion: Redirect
Afficher un message
Vieux 07/10/2006, 17h40   #3
markus w
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Redirect

Got it! :-)

# Skip rewriting for

# ... special directories (/img & /js)

# RewriteRule ^/(img|js) - [L]

# ... special extensions (.css & .jpg)

RewriteRule \.(css|jpg|gif)$ - [L]

# Redirect everything (else) to index.php

RewriteRule ^(.*)$ /index.php


markus


-----------------------------
Markus Walther (1064954)
Oslo, Norway
"markus w" <markus@removethis.erfaring.com> wrote in message
news:4527d4e3@news.broadpark.no...
> Another option would be redirecting ALL requests to myfile.php. Is that
> possible?
>
> markus
>
> -----------------------------
> Markus Walther (1064954)
> Oslo, Norway
> "markus w" <markus@removethis.erfaring.com> wrote in message
> news:4527d13c$1@news.broadpark.no...
>> If a user requests mydomain.com/Someword/Someotherword and the path does
>> not exist, I want apache to redirect to a .php-script which looks up the
>> words in a database etc.
>>
>> I'm able to do this using "ErrorDocument 404 error404.php", but there
>> must be a better way :-)
>>
>> What is best way to do this?
>>
>> markus
>>
>> -----------------------------
>> Markus Walther
>> Oslo, Norway
>>

>
>



  Réponse avec citation
 
Page generated in 0,06171 seconds with 9 queries