# Removing html and php extension

**URL:** <https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569>\
**Category:** RapidWeaver Classic\
**Created:** [April 10, 2017, 7:50pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569 "2017-04-10T19:50:46Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 10, 2017, 7:50pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/1 "2017-04-10T19:50:47Z")

</div>

Hi, I know my question has been asked before by someone else and has been answered before by, but I am clear how to fix it.

How can I remove the html and php from the url (extension) eg:

from: [www.mysite.com/index.html](http://www.mysite.com/index.html) to: [www.mysite.com](http://www.mysite.com)  
from: [www.mysite.com/contat-us.php](http://www.mysite.com/contat-us.php) to: [www.mysite.com/contact-us](http://www.mysite.com/contact-us)

Thank you!

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [April 10, 2017, 7:58pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/2 "2017-04-10T19:58:48Z")

</div>

If you enable the ‘Tidy Links’ setting in your Rapidweaver preferences it will do that but only for files that are named either index.php or index.html, it won’t work for contact-us.php

In those instances, you’d want to name the folder contact-us and the file index.php (or index.html)

Oh, and to get to that, go to the page sidebar and General Settings, then click the little ‘Advanced’ button in the bottom right of that window

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 10, 2017, 8:06pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/3 "2017-04-10T20:06:00Z")

</div>

@jabostick, thanks for your reply, I’ve just tried that and it did give me  
File not found (404 error)

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [April 10, 2017, 8:11pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/4 "2017-04-10T20:11:16Z")

</div>

What did you try and which URL gave you the error?

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 10, 2017, 8:14pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/5 "2017-04-10T20:14:01Z")

</div>

[www.mysite.com/about-us.php](http://www.mysite.com/about-us.php) (as about us has a form to collect data.  
please see the snapshot what I have entered. ![](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/6/68e2950f94a089885346f1b1ed669f8c18cdea15.png)

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [April 10, 2017, 8:17pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/6 "2017-04-10T20:17:57Z")

</div>

so your new address would be [www.mysite.com/about\_us](http://www.mysite.com/about_us) (without the .php you have above).

You may need to do a Republish all files after enabling the tidy links setting, I’m not sure…

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 10, 2017, 8:21pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/7 "2017-04-10T20:21:34Z")

</div>

done all that, still error… I will try again!

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [April 10, 2017, 8:25pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/8 "2017-04-10T20:25:01Z")

</div>

Or it could be caching as well. If you use cloudflare, for example, remember to put it in Developer Mode, or purge the files.

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 10, 2017, 8:56pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/9 "2017-04-10T20:56:58Z")

</div>

@jabostick apology but I am not sure how to do that!. I will keep trying! thanks.

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 11, 2017, 11:09am UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/10 "2017-04-11T11:09:39Z")

</div>

@jabostick just to let you know, it worked (cleared the browser cache) and voilà!

---

<div class="post-metadata">

**Author:** ![kevino](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/kevino/32/2801_2.png) [@kevino](https://forums.realmacsoftware.com/u/kevino)\
**Post date:** [April 12, 2017, 6:19pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/11 "2017-04-12T18:19:20Z")

</div>

While it probably isn’t required to keep it working, you may also want to delete the old files from the web server. RW doesn’t delete files when publishing so it is up to you to clean up the old stuff. I’ve run into problems when adding a stack to a page that switches it from html to php and then it is ambiguous as to which file should load when both index.html and index.php are in the directory.

---

<div class="post-metadata">

**Author:** ![monica](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/monica/32/17454_2.png) [@monica](https://forums.realmacsoftware.com/u/monica)\
**Post date:** [April 12, 2017, 7:15pm UTC](https://forums.realmacsoftware.com/t/removing-html-and-php-extension/13569/12 "2017-04-12T19:15:20Z")

</div>

@kevino Thanks Kevino, actually I did that after learning that RW does not delete all files.
