.htaccess file modification

I have a .htaccess file that organizes all requests through index.php. Now I would like to make an exception for rss.php. go straight through rss.php. How to do it?

Here's what it looks like now:

RewriteEngine on RewriteBase / RewriteRule !\.(js|ico|txt|gif|jpg|png|css)$ index.php 

Thanks.

+4
source share
3 answers

Put this before the last line.

 RewriteCond %{REQUEST_URI} !^/rss\.php$ 
+6
source

You can exclude any existing file with an additional RewriteCond :

 RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^ index.php [L] 
+4
source

Or, conversely, rewrite that matches the file, then skips the rest of the rewrite tests.

By placing the following line before your existing RewriteRule is redirected without going through index.php.

 RewriteRule ^/rss.php /rss.php [L] 

I came across this page while searching for a way to do this using my /robots.txt file.

mod_rewrite with apache1.3

0
source

All Articles