Web coding help

By : Business Start Up
Published 31st August 2012 |
Read latest comment - 2nd January 2013

Is there a simple way to remove the tag that appears at the end of your website for example the .php or .html

find what i need
Comments
Well not sure why you want to do that but the .php & .html files all help a website function.

Can you provide more info on why - what are you trying to achieve etc.

Well not sure why you want to do that but the .php & .html files all help a website function.

Can you provide more info on why - what are you trying to achieve etc.

hi, for example yourwebsite.com/help.php to be displayed as yourwebsite.com/help i think it looks better and it can get messy if i start adding in yourwebsite.com/help_and_so_on.php

find what i need

Try adding the following to your .htaccess file:

[CODE]RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*)$ $1.php[/CODE]

DanEZPZ

Well not sure why you want to do that but the .php & .html files all help a website function.

Can also be a good SEO trick, if you want your URL to rank for certain keywords, which your physical pagename might not be optimised for.

eg: this page on our job board is called /cv-wizard.php but is renamed /free-cv

The site dev did a rewrite from a header include:

<li <?php if ($_SERVER['PHP_SELF'] == "/cv-wizard.php"){ echo "id='current'";} ?> ><a href="<?php echo ABS_URL;?>free-cv"</a></li>

Over my head, but may be of help?

Steve Richardson
Gaffer of My Local Services
My Local Services | Me on LinkedIn

Thanks for all the info will give it ago

find what i need

which one did you use or did you try something else?

promostamper

After reading it, I have changed on my website for SEO reason.
Links are working both index.php and index. My web host assure me no performance (landing) problem. There is an entry on wikipedia (I can't post links now, keywords: Rewrite engine)

Thanks,
Design promote

This Thread is now closed for comments