Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

removing the .htm extension 1

Status
Not open for further replies.
You would probably need to create a folder rather than a file for each client. Then change the name of their file to index.htm and put it in their respective folders.
 
Thanks. Maybe I`ll try it because it involves editing all my pages! :(

Have to have a quite moment.

Thanks for your help

Mario
 
Hi,

I had to do the same thing but only for a small number of pages. Here's what i'd do.

Step 1.
delete mario.htm
create directory mario/
Step 2.
create a .htaccess file with the line:
Redirect mario.htm
Simple.
I'd even do it for you if you wanted!


É
::
 
Thank for offering. I really appreciated.

However, I am not sure of one thing ...

if I delete mario.htm which page will load or you mean do a copy under the respective folder?

Also after I write your line on the htaccess what will visitors need to type to access mario.htm. I did not really understand the redirection part...

Redirect mario.htm
Also I have a folder Mario where I keep the images for the page mario. However mario.htm is in the root directory. What if the folder mario is situated do I have to move the folder to root for user to have a short address to use ie:

I think I have confused you also! :)

Thank you

Mario
 
Hi,

Put the contents of mario.htm into mario/index.htm
(or copy mario.htm into mario/ then rename it as index.htm or whatever your default directory page is)
When people try to access mario.htm they will automatically be directed to mario/index.htm
This is for search engines and users so they get redirected automatically. Of course you should update any links you have on your site, not essential but definitly recommended.

As for the photos, they can go anywhwere you want as long as you link correctly to them.


É
::
 
Thanks mate.

I`ll mark your post as helpful.

Its the least I can do!

I gave a look @ your site. Its great. Infact I am downloading the html kit. It looks useful.

Thanks

Best regards

Mario
 
Hi guys,

While this is one way to do it, you should consider that the headers sent to the browser or search engine will be a redirect and not a 200 OK.

While this might not seem like much, there is a chance that some engines won't follow re-directs and will just remove that page from their index.

If you wanted to do this with minimal hassle, do some reaserch on mod_rewrite assuming this is for an Apache server.

A way I have previously done this in the past is to use an Alias directive for the particular script, but that would probably result in you needing access to the server config and is only really useful if you only have a few files to do this with..

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top