Re: Would this work? (mod_rewrite)
| From: | [ rswfire ] | Date: | Wed, 17 Apr 2002 22:00:51 +0000 |
| Subject: | Re: Would this work? (mod_rewrite) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-93415@lists.php.net to get a copy of this message | ||
Miguel, if I get this working I am going to be so happy :-)
I just tried putting the following in an .htaccess file in my root:
RewriteEngine on
RewriteBase / RewriteRule * index.phpAnd it came back with a server misconfiguration. So, did I do something wrong? ----Original Message Follows---- From: Miguel Cruz <mnc@stoic.net> To: "[ rswfire ]" <rswfire@hotmail.com> CC: php-general@lists.php.net Subject: Re: [PHP] Would this work? (mod_rewrite) Date: Wed, 17 Apr 2002 16:55:33 -0500 (CDT) On Wed, 17 Apr 2002, [ rswfire ] wrote:
Assume I want *.domain.*/*.* to automatically call index.php (without the user knowing and without any redirecting at all): RewriteEngine onRewriteRule * index.php Don't use the [R] - that tells it to create an external redirect. It's used in many of the examples because in many real-world cases people are using rewrite rules to coax invalid URLs into valid ones, and this way there's at least some chance that the bad ones will get updated. miguel _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.RewriteBase / RewriteRule *.* index.php [R]I don't know what in the world the [R] is, but it's in almost all of the mod_rewrite examples... :-)