.htaccess - How do I change htaccess so it -
what change url http://example.com/index.php?link=djasfjk http://example.com/djasfjk
but displays index page. how make displays url.php instead of index.php
options +followsymlinks -multiviews rewriteengine on rewritebase / rewritecond %{the_request} ^[a-z]{3,}\s/+(?:index\.php|)\?link=([^\s]+) [nc] rewriterule ^ /%1? [r=301,l] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l rewriterule ^(.+?)/?$ /?link=$1 [l,qsa] ive tried changing:
rewritecond %{the_request} ^[a-z]{3,}\s/+(?:index\.php|)\?link=([^\s]+) [nc] rewriterule ^ /%1? [r=301,l] to
rewritecond %{the_request} ^[a-z]{3,}\s/+(?:url\.php|)\?link=([^\s]+) [nc] rewriterule ^ /%1? [r=301,l] but did nothing :(
you can use .htaccess:
options +followsymlinks -multiviews rewriteengine on rewritebase / rewritecond %{the_request} ^[a-z]{3,}\s/+(?:(?:url|index)\.php)?\?link=([^&\s]+) [nc] rewriterule ^ /%1? [r=301,l,ne] rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !-l rewriterule ^(.+?)/?$ url.php?link=$1 [l,qsa]
Comments
Post a Comment