Reputation: 3629
I have some RewriteRule in htaccess to have some pretty urls for my landing page. The url can look like www.site.com/new-document and my RewriteRule will make that www.site.com/index.php?page=new-document
This way I can leave the pretty url and use index.php to change the text depending on the page variable.
Everything works perfectly well on http but once I add https to the url I get a Not Found error as in the RewriteRule is not triggering.
Here is a copy of my htaccess code
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^new-document$ index.php?page=new-document
RewriteRule ^old-document$ index.php?page=old-document
</IfModule>
Upvotes: 0
Views: 73
Reputation: 3629
Grasshopper and anubhava pointed me in the right direction!
My problem was that the https virtual host did not have the AllowOverride All directive.
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Upvotes: 2
Reputation: 152
Can you get to the HTTPS URL without the RewriteRule? It sounds like Apache may be using a different virtual host or not accepting HTTPS at all.
Upvotes: 1