RewriteRule Not Working
9 posts
• Page 1 of 1
RewriteRule Not Working
I just installed Helicon Ape on a server running SBS 2008 R2. I have ASP.NET installed as well as .NET framework 3.5. I'm trying to use the rewrite rules but I am unable to get them to work. I put in my root directory's htaccess file:
# Helicon Ape version 3.1.0.113
RewriteEngine On
RewriteRule . - [F]
However, I can still access my site. I have ErrorLog and RewriteLog enabled in the httpd.conf file within Ape. However, the error log and rewrite logs are both empty. I'm trying to use this rule for wordpress:
# Helicon Ape version 3.1.0.113
# Protect from spam bots
RewriteEngine On
RewriteLog rewrite.log
RewriteLogLevel 2
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*mydomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
This .htaccess file is located in mydomain.com/blog.
However, this obviously doesn't work because the test rule doesn't work.
Thanks everyone!
# Helicon Ape version 3.1.0.113
RewriteEngine On
RewriteRule . - [F]
However, I can still access my site. I have ErrorLog and RewriteLog enabled in the httpd.conf file within Ape. However, the error log and rewrite logs are both empty. I'm trying to use this rule for wordpress:
# Helicon Ape version 3.1.0.113
# Protect from spam bots
RewriteEngine On
RewriteLog rewrite.log
RewriteLogLevel 2
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post\.php*
RewriteCond %{HTTP_REFERER} !.*mydomain.com.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
This .htaccess file is located in mydomain.com/blog.
However, this obviously doesn't work because the test rule doesn't work.
Thanks everyone!
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: RewriteRule Not Working
Hello,
The problem is probably in permissions. .htaccess cant be read. Please, refer to this part of documentation: http://www.helicontech.com/ape/doc/security.htm
Regards
Andrew
The problem is probably in permissions. .htaccess cant be read. Please, refer to this part of documentation: http://www.helicontech.com/ape/doc/security.htm
Regards
Andrew
Re: RewriteRule Not Working
Hello Andrew,
I have given "IIS_IUSR" read and list folder contents permissions on the Helicon install folder as well as the website folder without resolution. The same problem still exists.
I have given "IIS_IUSR" read and list folder contents permissions on the Helicon install folder as well as the website folder without resolution. The same problem still exists.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: RewriteRule Not Working
are there any "deny" permissions given to other users (e.g. plesk admin users)?
Regards
Anrew
Regards
Anrew
Re: RewriteRule Not Working
Andrew,
None at all. I attached a screenshot of the permissions for the Helicon install directory as well as the domain directory. Let me know if you see anything that looks out of place.
Thanks,
Chris
None at all. I attached a screenshot of the permissions for the Helicon install directory as well as the domain directory. Let me know if you see anything that looks out of place.
Thanks,
Chris
- Attachments
-
- domain
- permissions2.jpg (89.2 KiB) Viewed 5548 times
-
- helicon
- permissions.jpg (91.8 KiB) Viewed 5548 times
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: RewriteRule Not Working
Please, shoot us en email with a reference to this post. We'll help you out by remotely connecting to this server.
Regards
Andrew
Regards
Andrew
Re: RewriteRule Not Working
Huge thanks to Andrew for getting this to work. Seems something went hairy with the install and a reinstall fixed the issue.
9 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 5 guests