Simple Mod-Rewrite rule - single rule - file exists

Posted by Andy Gee on Stack Overflow See other posts from Stack Overflow or by Andy Gee
Published on 2011-08-16T07:06:03Z Indexed on 2013/10/20 9:54 UTC
Read the original article Hit count: 235

Filed under:
|
|

I have a very simple mod rewrite rule

Options FollowSymLinks 
RewriteEngine On
RewriteRule ^hosted/essws/([^/]*)/$ /hosted/essws/?key=$1 [L]

I would like this rewrite to activate even if the file or directory exists.

For example: The URL:

http://localhost/hosted/essws/candy-sweets-buffet/

Will load:

http://localhost/hosted/essws/index.php?key=candy-sweets-buffet

Even though the directory /hosted/essws/candy-sweets-buffet/ exists.

Any help would be much appreciated.

© Stack Overflow or respective owner

Related posts about php

Related posts about .htaccess