php - htaccess exclude a page from rule -
options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritecond %{http_referer} !^http://(www\.)?pirate-punk.com(/)?.*$ [nc] rewriterule ([^/]+\.[a-z0-9]+)$ http://www.pirate-punk.com/dl.php?f=$1 [r,nc,l] options +indexes
this htaccess redirect incoming traffic page if come different domain.
i exclude index.php pages rule visitors can still visit index.php page if come outside of domain
how can ?
you can add condition excludes ends /
or /index.php
:
rewriteengine on rewritecond %{request_uri} !/(index\.php)?$ rewritecond %{http_referer} !^http://(www\.)?pirate-punk.com(/)?.*$ [nc] rewriterule ([^/]+\.[a-z0-9]+)$ http://www.pirate-punk.com/dl.php?f=$1 [r,nc,l]
Comments
Post a Comment