W
W
WQP2015-03-12 19:46:12
htaccess
WQP, 2015-03-12 19:46:12

How to make .htaccess for DLE?

Hello, I made htaccess that works without an engine, but how can I change it so that DLE gives access via links?
Here is the .htaccess code (in the iframe folder)

RewriteEngine On
RewriteRule ^([a-zA-Z0-9_\-]*)$ online.php?id=$1
RewriteRule ^video\/([\d\w_\-]+)/([\d\w_\-]+)$ get.php?id=$1&ep=$2

When you click on the links, there is just a white screen and no content is displayed (even there are no errors). How to fix?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey, 2015-03-13
@exotik997

Try this

RewriteEngine On
Options +Indexes
Options +FollowSymLinks
# Редирект для категорий (чтобы в конце URL был /)
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteCond %{REQUEST_URI} !.html$
RewriteCond %{REQUEST_URI} !.xml$
RewriteRule (.+) $1/ [R=301,L]
# Редирект c www на без www
RewriteCond %{HTTP_HOST} ^www.site.ru
RewriteRule ^(.*)$ http://site.ru/$1 [R=permanent,L]
# Редирект для главной (с /index.php,html на /)
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
RewriteRule ^index\.html$ / [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ / [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question