Its still showing .php extension
It won't change ur urls bro! instead try www.yoursite.com/home and it will automatically load the page www.yoursite.com/home.php
Posted 28 September 2010 - 02:18 PM
I saw some request in SEF for removing PHP, extension from URL.. you can do it by .htaccess files
here we go
Demo:
Before
www.yoursite.com/index.php
after
www.yoursite.com/index
Open your htaccess files add below code for phpOptions +FollowSymLinks Options +Indexes RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^\.]+)$ $1.php [NC,L]
for html
just add like thisRewriteRule ^([^\.]+)$ $1.html [NC,L]
I hope who had request of it, now solved problem.
thanks
Posted 11 April 2016 - 09:09 PM
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteRule ^([A-Za-z_-]+)$ /profile/$1 [R]
RewriteCond %{HTTP_HOST} ^www\.yourwebsite\.com [NC]
RewriteRule ^(.*)$ https://www.yourwebsite.com/$1 [L,R=301]
# Get rid of index.php
RewriteCond %{REQUEST_URI} /index\.php
RewriteRule (.*) index.php?rewrite=2 [L,QSA]
# Rewrite all directory-looking urls
RewriteCond %{REQUEST_URI} /$
RewriteRule (.*) index.php?rewrite=1 [L,QSA]
# Try to route missing files
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} public\/ [OR]
RewriteCond %{REQUEST_FILENAME} \.(jpg|gif|png|ico|flv|htm|html|php|css|js)$
RewriteRule . - [L]
# If the file doesn't exist, rewrite to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?rewrite=1 [L,QSA]
</IfModule>
# sends requests /index.php/path/to/module/ to "index.php"
# AcceptPathInfo On
# @todo This may not be effective in some cases
FileETag Size
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript
</IfModule>
Change yourwebsite.com to yours
0 members, 0 guests, 0 anonymous users