Apache modrewrite .htaccess question
I want to be able to rewrite a URL from:

http://example.com/location/New York, NY  -->  http://example.com/location/index.html?location="New York, NY"

AND/OR

http://example.com/location/90210  -->  http://example.com/location/index.html?location=90210`

AND/OR

http://example.com/location/Texas` --> http://example.com/location/index.html?location=Texas


Basically

http://example.com/location/ANYTHING....  -->  http://example.com/location/index.html?location=ANYTHING...`


using `.htaccess` and mod_rewrite.

Anyone know how to do this?

I have tried:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^location/(.*)$ /location/index.html?location=$1

But that doesn't work when I go to either the direct link:

http://example.com/location/index.html?location?=Houston, TX 

or the "pretty url" link:

http://example.com/location/Houston, TX

it cause an Apache "Internal Server Error"

I have also tried:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !location/index.html
    RewriteRule ^location/(.*)$ /location/index.html?location=$1

That does **not** cause an Internal Server error like the previous example, but it not passing the GET location variable to the /location/index.html page when you use the "pretty url" (e.g. http://example.com/location/90210).  I know this b/c when I echo out to the screen the location GET variable when the long url is used, it's set but when the pretty (short) url is used, the location GET variable is undefined.

Thanks in advance

Apache modrewrite .htaccess question
===

I want to be able to rewrite a URL from:

http://example.com/location/New York, NY  -->  http://example.com/location/index.html?location="New York, NY"

AND/OR

http://example.com/location/90210  -->  http://example.com/location/index.html?location=90210`

AND/OR

http://example.com/location/Texas` --> http://example.com/location/index.html?location=Texas


Basically

http://example.com/location/ANYTHING....  -->  http://example.com/location/index.html?location=ANYTHING...`


using `.htaccess` and mod_rewrite.

Anyone know how to do this?

I have tried:

    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule ^location/(.*)$ /location/index.html?location=$1

But that doesn't work when I go to either the direct link:

http://example.com/location/index.html?location?=Houston, TX 

or the "pretty url" link:

http://example.com/location/Houston, TX

it cause an Apache "Internal Server Error"

I have also tried:

    RewriteEngine on
    RewriteCond %{REQUEST_URI} !location/index.html
    RewriteRule ^location/(.*)$ /location/index.html?location=$1

That does **not** cause an Internal Server error like the previous example, but it not passing the GET location variable to the /location/index.html page when you use the "pretty url" (e.g. http://example.com/location/90210).  I know this b/c when I echo out to the screen the location GET variable when the long url is used, it's set but when the pretty (short) url is used, the location GET variable is undefined.

Thanks in advance
