Forum Moderators: phranque

Message Too Old, No Replies

Problem of .htaccess

When it works everywhere except on this server...

         

Matsuibiza

7:24 pm on May 7, 2005 (gmt 0)

10+ Year Member



Hi,

This is my first post, I am really excited ;)

I am working for a client and I need to do some URL rewriting for SEO purposes. Basically, the server is using Apache - PHP. I have created a .htaccess file to rewrite .htm to .php, the simple .htaccess that runs everywhere... Except on this server.

Find a copy of my .htaccess file below:

RewriteEngine on
RewriteRule (.*).htm$ /$1.php

What could be the best way to check if the mod_rewrite in on? Is it ok to mention the name of the hosting company?

Many thanks

Matsuibiza

mack

9:42 pm on May 9, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Are you running a dedicated box or a shared hosting package?

Of youre on a dedicated box you can set .htaccess as an "over-ride" file.

IF YOU MAKE ANY CHANGED TO YOUR HTTPD.CONF FILE ALWAYS BACK IT UP BEFORE YOU DO SO!

On your httpd.cong filne this directive...

AccessFileName directive

make sure the following is set

AccessFileName .htaccess

In short this is telling Apache to accept modifications to it's configuration based on .htaccess files

Also note .htaccess is an Apache concept, and will not work on non apache servers.

Mack.

isorg

9:48 pm on May 9, 2005 (gmt 0)

10+ Year Member



Welcome to WebmasterWorld!

Make sure the the .htaccess is executable i.e. chmod it (on a Unix system) to be readable and executable.

Matsuibiza

11:15 pm on May 10, 2005 (gmt 0)

10+ Year Member



Hi,

Many thanks for the reply. I have been in touch with the hosting company and apparently they don't know what I am talking about... MY GOD!

It's time for me to change...

Again, many thanks for your help, I'm sure this will be very useful in the future.

Matsuibiza