Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Redirect file.php to file with .htaccess | Redirect to its non .php version

# To externally redirect /dir/file.php to /dir/file
RewriteCond %{THE_REQUEST} s/+(.+?).php[s?] [NC]
RewriteRule ^ /%1 [R=301,NE,L]
 
PREVIOUS NEXT
Tagged: #Redirect #file #Redirect #version
ADD COMMENT
Topic
Name
4+1 =