Reputation: 570
The URL I want to rewrite is: http://domain.com/index.php?name=home
to http://domain.com/
.
I have created the .htaccess file and put this code for rewrite:
RewriteEngine On
RewriteRule ^ index.php?name=home [L]
But it doesn't work. All requests in my site will redirect to http://domain.com/
.
Help me to fix this. Thanks you!
Upvotes: 1
Views: 348
Reputation: 120
This is generally because of the structure of your page calls , since I dnt know the sources of your files and how you implementet over ftps , you need to organize your pages , there should be a folder called public this folder usually contain your public pages in that .htaccess as well as your script files.
Upvotes: 1
Reputation: 143906
You need to add an "end of string" match to your regex:
RewriteEngine On
RewriteRule ^$ index.php?name=home [L]
Upvotes: 2