views:

34

answers:

1

I am working on a host that blocks my .htaccess file from being used so I can not change my permalinks using it. I need to figure out what code to use and where to put it in my httpd.conf file to get the same effect.

The code in the .htaccess file is below:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
A: 

You'll need to wrap that code in a <Directory> directive. Where it goes will depend on what else you've got in your http.conf file. See the Apache docs for more info.

However, as blockhead says; if your host won't let you use .htaccess files, you've got virtually no chance of being allowed near the httpd.conf file.

MatW
Do I wrap the same code above in the <Directory> ? Not sure how that works.
Brad
Yup. The <Directory> directive just tells Apache that any code within it should only be applied to the directory in question (in this case the dir you were trying to put the .htaccess file into).
MatW
Thanks!! I placed everything in the code above into the httpd.conf file inside the <dirctory> </directory> tags just below the other stuff that was there. After I restarted apache it worked like a champ. This is a weird situation where the .htaccess is blocked by a firewall. I have full access to the server but not to the firewall that is doing the damage so I have to do everything through the httpd.conf.
Brad