Jump to content

Photo
- - - - -

Remove PHP, HTML extension from your URL


  • Please log in to reply
14 replies to this topic

#1 aflaton

aflaton

    Blue Team Alpha 1

  • Premium
  • Level
  • 996 points
  • 1,418 posts
    • Gender:Male


Users Awards

Posted 14 August 2010 - 10:03 AM

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 php
Options +FollowSymLinks
 Options +Indexes
 RewriteEngine on
 RewriteCond %{SCRIPT_FILENAME} !-d
 RewriteRule ^([^\.]+)$ $1.php [NC,L]

for html
just add like this
RewriteRule ^([^\.]+)$ $1.html [NC,L]

I hope who had request of it, now solved problem.
thanks
if($noob == true || $search == false){
echo 'Please use advance search.';
} else if($topic != $forum) {
echo 'Please post in the correct forum.';
} else if($search && $topic =='0'){
echo 'Thanks You';
}

#2 Bangash

Bangash

    Blue Team Bravo 1

  • Moderators
  • Level
  • 1,488 points
  • 1,741 posts
    • Gender:Male
    • Location:Peshawar, Pakistan
    • Software:SE 4.1.x


Users Awards

Posted 14 August 2010 - 10:19 AM

Its still showing .php extension

Im like an open book. You must meet me if u wanna read me :)


#3 peter35dublin

peter35dublin

    Level 2

  • Members
  • Level
  • 15 points
  • 41 posts

Posted 14 August 2010 - 12:43 PM

I did it in my phpAdmin cpanel by redirecting .com/index.php to .com/

#4 ethickalhacker

ethickalhacker

    Level 3

  • Banned
  • Level
  • 34 points
  • 67 posts

Posted 14 August 2010 - 12:50 PM

some times it will makes Probs to SEO of Your Website . It will not get indexed in Google

Edited by ethickalhacker, 14 August 2010 - 12:54 PM.

Posted Image

#5 oevallejo

oevallejo

    Level 2

  • Members
  • Level
  • 23 points
  • 41 posts

Posted 14 August 2010 - 01:52 PM

nice answer its important to SEO index

#6 sakume

sakume

    Basic Developer

  • Banned
  • Level
  • 104 points
  • 162 posts
    • Gender:Female

Posted 15 August 2010 - 09:16 PM

some times it will makes Probs to SEO of Your Website . It will not get indexed in Google


I've seen no complications regarding using codes like this in htaccess and not with SEO campaigns. If somethings hurting your SEO, it's not this addition hurting it. Just change your SEO campaign up a little as search engines are changing all the time, especially google.
If at first you don't succeed, wait until someone has it right and gank their stuff!

#7 david

david

    Level 1

  • Members
  • Level
  • 4 points
  • 10 posts
    • Gender:Not Telling

Posted 17 August 2010 - 11:59 AM

wow thats great, works really well

do we need to change the links in the site as they are still pointing to the .php extention, we can call

mysite.co.uk/index and it's showing

but every link in the site is pointing to the .php

hope this make sense

david

#8 aflaton

aflaton

    Blue Team Alpha 1

  • Premium
  • Level
  • 996 points
  • 1,418 posts
    • Gender:Male


Users Awards

Posted 18 August 2010 - 02:40 AM

David I will make it for you lool you only need to click on Posted Image under the post you got helped from any where. in SEF

thanks
if($noob == true || $search == false){
echo 'Please use advance search.';
} else if($topic != $forum) {
echo 'Please post in the correct forum.';
} else if($search && $topic =='0'){
echo 'Thanks You';
}

#9 rembon

rembon

    Level 4

  • Members
  • Level
  • 40 points
  • 144 posts
    • Gender:Male
    • Location:Indonesia


Users Awards

Posted 19 August 2010 - 02:45 PM

Yes right, its problem for your crawl from search engine

I'm specialist for its .............. :shake:

#10 SreejithMJ

SreejithMJ

    Level 1

  • Members
  • Level
  • 43 points
  • 18 posts

Posted 05 September 2010 - 10:42 PM

Great Post Bro! I was searching for this for a long. Those who don't know its importance, we can't Blame them!!

Anyway Thanks Again + REP :)
<?= 'Poet in Coding' ?>




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.