I\'ve a php page with following link structure:
http://localhost/wisper/businesspage.php?profile=creativeartbd
So I\'m trying to convert this
This ruleset should work for you:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond $1 !^businesspage.php
RewriteRule ^wisper/(.*?)$ wisper/businesspage.php?profile=$1 [QSA,L]
Please note the RewriteCond
in the 6th line: it tells mod_rewrite not to rewrite the wisper/businesspage.php
, thus avoiding loops.
You are doing it wrong try this
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteBase /
RewriteRule ^wisperpage/(.*?)$ wisper/businesspage.php?profile=$1 [QSA,L]
You need to change the first uri segment because rewriting wisper/creativeartbd
to wisper/businesspage.php?profile=$1
will creates the infinite loop