how setup med .htaccess file, rewrite www.mydomain.com/index.php?page=home www.mydomain.com/home?
i have tried piece of code, doesn't want.
rewriteengine on rewritebase /
# removes index.php expressionengine urls rewritecond %{the_request} ^get.*index\.php?page= [nc] rewritecond %{request_uri} !/system/.* [nc] rewriterule ^([^/]+)/? index.php [l,qsa] # directs ee web requests through site index file rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.*)$ /index.php?page=$1 [l]
your first redirect rule in not right. can use:
rewriteengine on rewritebase / # removes index.php expressionengine urls rewritecond %{the_request} /index\.php\?page=([^\s&]+) [nc] rewritecond %{request_uri} !/system/.* [nc] rewriterule ^ /%1? [r=302,l,ne] # directs ee web requests through site index file rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewriterule ^(.+)$ /index.php?page=$1 [l,qsa]
Comments
Post a Comment