.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

Popular posts from this blog

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -