.htaccess rewrite not working

Posted by snumb130 on Stack Overflow See other posts from Stack Overflow or by snumb130
Published on 2010-06-17T13:29:24Z Indexed on 2010/06/17 13:33 UTC
Read the original article Hit count: 261

Filed under:
|
|

I need help with a rewrite in .htaccess.

I am trying to do the following: When a user types http://www.example.com/csc/alabama/ I need to pull info from http://www.example.com/csc/index.php?state=alabama

I thought it should be this

Options +FollowSymLinks
RewriteEngine On
RewriteRule ^csc/([^/]*)$ /csc/index.php?state=$1 [L]

I keep getting a 404 error.

On a side note, I would like to be able to do this with a generic sub-directory, so that csc could be abc or anything else but this is not the priority.

© Stack Overflow or respective owner

Related posts about apache

Related posts about .htaccess