Jump to content

Getting 403 after enabling Rewrite URLs


alfanexus

Recommended Posts

When I go into System->Search Engine Optimization in AdminCP and enable Rewrite Urls I get 403 HTTP errors after uploading the .htaccess file I am told to upload.

This is on a test server, no real domain has been setup yet. So the sitename I use is something like: http://135.78.214.67/testsite.com

And the content of .htaccess that I downloaded from ACP and uploaded to server rooth looks like this:

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /testsite.com/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico)(\?|$) /testsite.com/404error.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /testsite.com/index.php [L]
</IfModule>

testsite.com is just a folder on that server and this is the location where IPS is installed.

What could be wrong?

Link to comment
Share on other sites

I have already tried that it still gives me 403 when I upload .htaccess with the following

 

<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule \.(js|css|jpeg|jpg|gif|png|ico)(\?|$) /404error.php [L,NC]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

 

Link to comment
Share on other sites

Yes mod_rewrite is enabled. Tested it with the following php script:

 

<?php
 if(!function_exists('apache_get_modules') ){ phpinfo(); exit; }
 $res = 'Module Unavailable';
 if(in_array('mod_rewrite',apache_get_modules())) 
 $res = 'Module Available';
?>
<html>
<head>
<title>A mod_rewrite availability check !</title></head>
<body>
<p><?php echo apache_get_version(),"</p><p>mod_rewrite $res"; ?></p>
</body>
</html>

Wich returned: Module Available...  so this should be working.

Link to comment
Share on other sites

I had to do a little research to find that information and what it is, I found the following in a httpd.conf file on the server:

<Directory />
    AllowOverride none
    Require all denied
</Directory>

So that that could be the problem. I dont want to mess with serverfiles I Dont know about, so I will have to check with my host tommorow.

 

Thank you very much for your help :thumbsup:

Link to comment
Share on other sites

  • 6 months later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...