The Concept: I wish to allow it to be that something that uses the domain title and finishes with .html is treated like a get variable by index.php
www.test.ro/1/2/3.html should really be
www.test.ro is setup like a virtual host for development, and
AllowOverride has value All.
The .htaccess file appears to become processed, although not constantly. Basically write a non-recognized rule like 'BizzareRule', the server works without coming back a code 500 error.
Basically put correct rules between
<IfModule mod_rewrite.c></IfModule>, I recieve an 500 error, despite the fact that I've other vhosts utilizing the same conditions and dealing perfectly.
Listed here are the items in my vhost:
<VirtualHost *:80> ServerAdmin email@example.com ServerName www.test.ro ServerAlias test.ro DocumentRoot D:/Projects/grabsite/test.ro Options Indexes FollowSymLinks MultiViews DirectoryIndex index.php index.html LogLevel warn ErrorLog D:/Projects/grabsite/test.ro/error.log CustomLog D:/Projects/grabsite/test.ro/access.log combined <Directory "D:/Projects/grabsite/test.ro"> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost>
And test content for .htaccess:
RewriteEngine On RewriteRule ^/?([^/]*)\.html$ /index.php?seo=$1 [L]
It appears that you simply makes its way into in infinite loop. Try first to simplify the rule:
RewriteRule ^(.*)\.html$ /index.php?seo=$1 [L]
RewriteRule ^index.html$ /index.php?seo=$1 [L]
Next, it is best to have RewriteCond -f and RewriteCond -d so as not to complete the rule if you're asking for existing file/folder. In certain situations, this could prevent an infinite loop within the rule
The issue is in regex pattern. You stated: "The .htaccess file appears to become processed, although not constantlyInch.
Should you look at your pattern
^/?([^/]*)\.html$ you will find that this works for files in root folder ONLY (e.g.
Solution: change pattern to
^(.+)\.html$ and all sorts of is going to be fine -- now it'll match ANY URL that finishes with .html (e.g.
/index.html in addition to