S
S
Sharov Dmitry2016-02-01 11:36:10
Apache HTTP Server
Sharov Dmitry, 2016-02-01 11:36:10

Is this htaccess correct?

There is such an htaccess file
Everything works as it should, but is this approach steamy

DirectoryIndex	index.htm index.php
AddDefaultCharset UTF-8
ErrorDocument 404 /views/404.php

RewriteEngine On

Redirect 301 /assortiment.html /assortiment/
## Тут кучка редиректов, не большая

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_URI} !^/assortiment/.+
RewriteCond %{REQUEST_URI} !^/info/.+
RewriteRule   ^(.*)$  /index.php?module=$1 [QSA]

Confuses
RewriteCond %{REQUEST_URI} !^/assortiment/.+
RewriteCond %{REQUEST_URI} !^/info/.+
Added to exclude these cases from the rule otherwise the curve redirect would
result in urls ala /assortiment-natural-tkani/?module= assortment/natural-tkani.html

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question