Evan_McIntosh Posted August 18, 2013 Share Posted August 18, 2013 RewriteRule ^([^/]*)\.html$ random.php?id=$1 [L] Any link to a file in the folder will be Rewritten as above. example: www.url.com/cat.html becomes: www.url.com/random.php?id=catHow can I make a link ignored so a html file in the folder can be opened? Quote Link to comment https://forums.phpfreaks.com/topic/281327-make-a-file-ignore-rewriterule/ Share on other sites More sharing options...
Solution jazzman1 Posted August 19, 2013 Solution Share Posted August 19, 2013 (edited) Hm...the easiest way that I know is not applying a rule to this url request. Try next and tell us if you have a problem: RewriteCond %{REQUEST_URI} !cat.html RewriteRule ^([^/]*)\.html$ random.php?id=$1 [L] Edited August 19, 2013 by jazzman1 Quote Link to comment https://forums.phpfreaks.com/topic/281327-make-a-file-ignore-rewriterule/#findComment-1445733 Share on other sites More sharing options...
Evan_McIntosh Posted August 19, 2013 Author Share Posted August 19, 2013 Thank you works like a charm! Quote Link to comment https://forums.phpfreaks.com/topic/281327-make-a-file-ignore-rewriterule/#findComment-1445817 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.