CoolMan
CoolMan

Reputation: 11

url rewriting not showing index page

I have this htaccess file:

Options +FollowSymLinks  

RewriteEngine On  

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f  

DirectoryIndex index.php

RewriteRule ^doit$ doit.php [L]

RewriteRule ^([\$\.A-Za-z0-9_-]+)$ follow.php?follow=$1 [QSA,L]

But when i try to go in the index page, everytime showing follow.php page, even doit page show this last one.

Any fix for this issue please ?

Thank's.

Upvotes: 0

Views: 27

Answers (1)

jorgesuarezch
jorgesuarezch

Reputation: 306

RewriteCond technically applies only to the first RewriteRule, so please try using something like this:

Options +FollowSymLinks  

RewriteEngine On  

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d  
RewriteCond %{SCRIPT_FILENAME} !-f 
RewriteRule ^([\$\.A-Za-z0-9_-]+)$ follow.php?follow=$1 [QSA,L]

#RewriteConds for this rule
RewriteRule ^doit$ doit.php [L]




DirectoryIndex index.php

I hope be useful. Regards.

Upvotes: 1

Related Questions