I Successfully Added My First .htaccess File to Hostwell

I’ve attempted to created .htaccess files in the past with little success. I’ve read various tutorials with slight variations, yet none worked for me. The frustrating thing is that there are tons of sources and tuts available but I haven’t been able to find one that actually worked. That is until today.

Thanks to Webweavers htaccess redirect article I was able to:

  1. Redirect my www to my non-www URL.
  2. Create a 301 redirect for a direct mail campaign I’m working on. (Basically I didn’t want to put www.hostwell.cc/hello.php – I want to print /hello and have it redirect my prospects to /hello.php – so I used a 301 redirect.)

While I’ll call that a success, I’m still trying to figure out how to:

  1. Strip the ‘.php’ ending off all my URLs.
  2. Redirect my /index.php file to http://hostwell.cc/

If you know how to do this or know of a straight forward tut dealing with static (non-dynamic) URLs, please leave a comment below.

Published on Sep 04 in Success! written by Bob Potter
  • adampassey
    Excellent! It's exciting to get your first .htaccess file to work. Here's how you can use your .htaccess file to strip the /index.php off of http://hostwell.cc.

    Inside your .htaccess file add these lines:

    RewriteEngine on

    RewriteRule ^index\.php$ http://hostwell.cc/ [r=301,L]
blog comments powered by Disqus