A
A
Alexey Nikolaev2015-05-06 21:22:52
PHP
Alexey Nikolaev, 2015-05-06 21:22:52

Why does one block in htaccess affect the previous one?

Good evening.
There is a standard htaccess Joomla, I'm trying to glue duplicate pages together so that when you enter a link like index.php/post, a redirect to /post occurs.
The task itself is not directly related to Joomla, the question is different. Why does my redirect (located first) work correctly only when the last block with a completely different redirect is missing? And is it possible to make friends with each other these blocks?
I would be very grateful for the tips, thanks.

IndexIgnore *

Options +FollowSymlinks
Options -Indexes

RewriteEngine On

RewriteBase /

# мой редирект, 302 стоит в целях дебага
RewriteRule ^(.*)?index\.php?(.*)$ /test [R=302,L]

# стандартный блок
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nazar Mokrinsky, 2015-05-07
@Heian

You do not fully understand how mod_rewrite works, in detail about the subject , this should be enough.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question