Forum Moderators: phranque
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ bankingdetail.php?route=$1 [L,QSA]
Im using php and it worked fine checkink the route value.
Now I added :
RewriteRule ^(.*)$ paydaydetail.php?route=$1 [L,QSA]
But seems like it messed up the htaccess process.
I mean, by sample, www.mysite.com/paydaydetail.php?id=20, but he need redirect to www.mysite.com/MypaydayWorld
But it didn't worked...
I mean, it worked with the first page and the firs rule () not on the second rule (RewriteRule ^(.*)$ bankingdetail.php?route=$1 [L,QSA]) and i dont know what to do with the second rule. Maybe, i was thinking , we will need some general rule for all the pages,right? But I tried some lines and it didnt worked, please, let me know if you see some fix for this issue.
Thanks in advance!
Tic
In case it is not clear, RewriteRule works like this:
RewriteRule requested-URL --> substitution-URL-or-filepath.
Therefore in your first rule above, you are saying:
If the requested URL does not resolve to a physically-existing file
AND
If the requested URL does not resolve to a physically-existing directory
THEN
Rewrite all URL-path requests to bankingdetail.php and set the query string variable "route" equal to the requested URL-path.
A bad rule --even one with a tiny error-- can be very dangerous to the operation and ranking of your Web site.
Jim
Then set up a rewrite so that those URL formats pull the content from your dynamic parameter-driven script, without revealing the complexity of those parameters back to the user.
That is URLs with an 's' and some digits get routed to a different script than requests for some other URL format. The leading 's' in the URL identifies to Mod_Rewrite what to do with this URL request.
The leading letter would act as a URL filter. Instead of using (.*) to grab all URLs you would use the leading letter in the pattern so that only URLs that contain that letter will be affected by this rule. URLs with a different letter would be processed by a different rule.