.htaccess - htaccess rewrite all pages except two -


i have code in htaccess file:

options +followsymlinks -multiviews rewriteengine on rewritebase /  rewritecond %{http_host} =  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d  rewriterule ^login/?$ login.php rewriterule ^logout/?$ logout.php  rewriterule ^([\w/-]+)/?$ index.php?id=$1 [l,qsa] 

so want rewrite links index.php?id=link-here

excluding /login , /logout should rewrite login.php , logout.php not working. seem using ?id=...

you can have way

options +followsymlinks -multiviews rewriteengine on rewritebase /  # remove 2 following lines when running on localhost rewritecond %{http_host} !^admin\.integra-uk\.net$ [nc] rewriterule ^ - [l]  rewriterule ^login/?$ login.php [l] rewriterule ^logout/?$ logout.php [l]  rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^([\w/-]+)/?$ index.php?id=$1 [l,qsa] 

Comments

Popular posts from this blog

Java 8 + Maven Javadoc plugin: Error fetching URL -

android - How to delete or change the searchview icon inside the SearchView actionBar? -

c++ - Msgpack packing bools bug -