Search
 
SCRIPT & CODE EXAMPLE
 

HTML

htaccess code to remove .php extension

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{REQUEST_METHOD} !POST
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}s([^.]+).php [NC]
RewriteRule ^ %1 [R=302,L,NE]

## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f [NC]
RewriteRule ^ %{REQUEST_URI}.php [L]
Comment

PREVIOUS NEXT
Code Example
Html :: js add class when hover 
Html :: escape double quotes in html 
Html :: html lazy loading images 
Html :: img tamanho html 
Html :: chrome clear cache for one site 
Html :: Add fav icon to browser tab 
Html :: How can I change the color of one word in HTML? 
Html :: chrome full screen mac hide tabs 
Html :: min number input html 
Html :: external js 
Html :: how to make a clickable image in html 
Html :: textarea angular onfocus 
Html :: html comment 
Html :: insertar fecha en pagina web 
Html :: html first line indent 
Html :: tailwind 
Html :: how to put image center in html stack overflow 
Html :: restart remote computer cmd using ip address 
Html :: pass text from input field to javascript function 
Html :: how to access value of ant design elements 
Html :: link new tab html 
Html :: html make page not zoomable 
Html :: Disable auto submit when hitting enter key 
Html :: html5 astrix for absolutely required field inside a td tag 
Html :: html video fullscreen 
Html :: r download a url 
Html :: bootstrap5 lineheight 
Html :: input field in dropdown 
Html :: html 
Html :: bootstrap 5 color picker 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =