My knowledge about htaccess says that once [L] flag is used, rules stand terminated and no further rules will be executed. But here dont know why rules are not working after i added following rule to my current htaccess.
#### Redirect all non-file & non-directory url to Results.php ####
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./Results.php [L]
All valid urls e.g. Job-Details.php
are also redirecting to Results.php script.
Note : I have already checked after restarting all services of wamp server & cleared cache.
EDIT 1:- I got to know after spending more than 1 day reading that i was not able to explain what i want as solution. Big apologies for that.
Now, clear thought is, after Job-Details.php
url rewriting, url becomes like
http://domain.com/7997
i want, that this url should not go to Results.php
by default though it's non-existing file/directory name & should use Job-Details.php
script in place of Results.php
.
I have tried using following code but no positive results.
Rewritecond %{REQUEST_URI} [^0-9/]$
How should i go? any expert advise?
My complete htaccess
Options +FollowSymLinks
### Start rewrite and set basedir
RewriteEngine on
Rewritebase /Domain.com/
########### Redirect all non-file & non-directory url to Results.php ############
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^.*$ ./Results.php [L]
########### Remove php extension ####################
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
########### Job detail page extension remove ####################
RewriteCond %{THE_REQUEST} Job\-Details\.php\?Job_ID\=(\d+) [NC]
RewriteRule ^ %1? [R=301,L,NE]
########### Result page extension ####################
#RewriteCond %{THE_REQUEST} Results\.php\?url\=([A-Za-z0-9-_]+) [NC]
#RewriteRule ^ %1? [R=301,L,NE]
I have tried searching logic behind this behavior but couldn't find any or i may have searched wrong pharse.