rewrite condition for directory along with file
Posted
by
RHR
on Stack Overflow
See other posts from Stack Overflow
or by RHR
Published on 2012-11-29T04:34:06Z
Indexed on
2012/11/29
5:04 UTC
Read the original article
Hit count: 106
Any one please help me.I am new to .htaccess
I want to check the following condition
RewriteCond : IF !index.html AND !app/facebookapp/{[a-zA-Z0-9-/]}.html
RewriteRule : .....
My code is
RewriteCond %{REQUEST_URI} !index\.html
RewriteCond %{REQUEST_URI} app/facebookapp/^([a-zA-Z0-9-/]+).html$
RewriteRule ......
its not working
And one more question
if the request url is header.html
RewriteCond %{REQUEST_URI} header.html$
RewriteRule ^([a-zA-Z0-9-/]+).html$ position.php?position=$1 [L]
$l
will return header
.
if the request url is app/facebookapp/header.html
we write the same above condition $l
will return app/facebookapp/header
.my question is how to get only the filename ??
thanks
© Stack Overflow or respective owner