Problem with RewriteRule first time setp

Helicon Ape provides support for Apache .htacces and .htpasswd configuration files for Microsoft IIS.
User avatar
Posts: 6
Joined: 07 May 2014, 16:23

Problem with RewriteRule first time setp

27 Jun 2017, 10:59

I just purchased Helicon Ape and installed it on a new Windows 2016 server. I am successfully using .htaccess and .htpasswd to secure a directory, so that much is working.

My next task is to setup rewrite rules for a website. Below is the content of .htaccess in the root directory of my website. I am trying to load this URL:
http://www.domain.com/Postal-History/ar ... ht_covers/

But I get an error: HTTP Error 404.0 - Not Found

I was previously using IIRF on a Windows 2003 server, which has its own rewrite system, however I believe it is compatible with .htaccess. I have not changed the syntax at all.

Assuming there isn't anything wrong with the syntax of my code, where should I start to troubleshoot this problem?

There is nothing in the LOG files for Ape. My license credentials are valid (shows in the log). When I pull up the Ape application in Windows and browse to my website, it is seeing the .htaccess file and the content shown below. Not sure where to look next.

Thank you!

------------------------------

RewriteEngine On

RewriteRule ^/livemerchant /livemerchant/index.asp

RewriteRule ^/Postal-History/([^/]+)/$ /postal-history-results.htm?seo_country=$1
RewriteRule ^/Postal-History/([^/]+)/([^/]+)/$ /postal-history-results.htm?seo_country=$1&seo_state=$2
RewriteRule ^/Postal-History/([^/]+)/([^/]+)/([^/]+)/$ /postal-history-results.htm?seo_country=$1&seo_state=$2&seo_county=$3
RewriteRule ^/Postal-History/([^/]+)/([^/]+)/([^/]+)/([^/]+)/$ /postal-history-results.htm?seo_country=$1&seo_state=$2&seo_county=$3&seo_town=$4

RewriteRule ^/Philatelic-Literature/([^/]+)/$ /philatelic-literature-results.htm?seo_title=$1
RewriteRule ^/Philatelic-Literature/([^/]+)/([^/]+)/$ /philatelic-literature-results.htm?seo_title=$1&seo_author=$2
RewriteRule ^/Philatelic-Literature/([^/]+)/([^/]+)/([^/]+)/$ /philatelic-literature-results.htm?seo_title=$1&seo_author=$2&seo_isbn=$3

RewriteRule ^/US-Worldwide-Stamps/([^/]+)/([^/]+)/$ /stamps-results.htm?seo_country=$1&seo_catno=$2
RewriteRule ^/US-Worldwide-Stamps/([^/]+)/([^/]+)/([^/]+)/$ /stamps-results.htm?seo_country=$1&seo_category=$2&seo_catno=$3

User avatar
Posts: 6
Joined: 07 May 2014, 16:23

Re: Problem with RewriteRule first time setp

27 Jun 2017, 14:15

UPDATE:

I removed the / (slashes) after the ^ symbol in my rules. Now it works! However, I'm not sure why, and I want to know that I haven't caused any unintended side effects. What is the difference between this:

RewriteRule ^/Postal-History/([^/]+)/$ /postal-history-results.htm?seo_country=$1

And this?...

RewriteRule ^Postal-History/([^/]+)/$ /postal-history-results.htm?seo_country=$1

Return to Helicon Ape

Who is online

Users browsing this forum: No registered users and 0 guests