gi8ri7
#141
Hullas .htaccess ga http pratakoldan https pratakolga yo’lash uchun kod yozilgan i other/page.php ni page.php ga alishtirish kodi yozilgan shu htaccess orqali urli taxrirlangan sahifaga http pratakol bilan kirilganda sahifani asl urlni sotib qo’yayabdi
Masalan http://uzfor.uz/chat.php ga kirsez httрs://uzfor.uz/pages/chat.php ga tushas, men buni o’zimda sinab ko’rmadim i uzforda bu qanaqa yozilgan bilmayman sizlar bu nimadan deb o’ylaysizlar?
0
tahrirlandi · лет oldin
Akbarali
#142
kHakimzhon, # kHakimzhon (21.04.2020 / 19:53)
Hullas .htaccess ga http pratakoldan https pratakolga yo’lash uchun kod yozilgan i other/page.php ni page.php ga alishtirish kodi yozilgan shu htaccess orqali urli taxrirlangan sahifaga http pratakol
Siz xato qilgansiz

https://uzhackersw.uz/contact.php
https://uzhackersw.uz/pages/contact.php


http://uzhackersw.uz/contact.php
http://uzhackersw.uz/pages/contact.php


Menimcha https redriketni other/page.php ni page.php ga alishtirish kodidan keyn yozgansiz shuning uchun xato
0
tahrirlandi · лет oldin
sirli
#143
ErrorDocument 402 /error/402.html

ishlamayapti
yordam bervorila
0
shahzodbekpro
#144
sirli, # sirli (30.05.2020 / 19:51)
ErrorDocument 402 /error/402.html

ishlamayapti
yordam bervorila
Options -Indexes
ErrorDocument 402 http://yoqubov.uz/index.php
ErrorDocument 403 http://yoqubov.uz/index.php
ErrorDocument 404 http://yoqubov.uz/index.php
ErrorDocument 500 http://yoqubov.uz/index.php
DirectoryIndex index.php
0
TimX
#145
www.site.uz ni http://site.uz ga redirect qilish kodi shunday yoziladimi?
0
Kod · PHP5 qator
RewriteEngine On

RewriteCond %{HTTP_HOST} ^(.www)\.sayt\.uz$ [NC]

RewriteRule ^  http://sayt.uz [L,R]
sirli
#146
shahzodbekpro, Bolmadida aka
0
TimX
#147
sirli, # sirli (30.05.2020 / 22:10)
shahzodbekpro, Bolmadida aka
Options -Indexes
ErrorDocument 402 /?err
ErrorDocument 403 /?err
ErrorDocument 404 /?err
ErrorDocument 500 /?err
0
Akbarali
#148
TimX, # TimX (30.05.2020 / 21:53)
www.site.uz ni http://site.uz ga redirect qilish kodi shunday yoziladimi?

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.www)\.sayt\.uz$ [NC]
RewriteRule ^ http://sayt.uz [L,R]
Мен ишлатаётганим
0
Kod · PHP9 qator
HTTPS 

     RewriteEngine On

     RewriteCond %{HTTPS} off

     RewriteCond %{HTTP:X-Forwarded-Proto} !https

     RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
TimX
#149
Akbarali, # Akbarali (01.06.2020 / 12:19)
TimX, Мен ишлатаётганим


HTTPS
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQ
Men so'ragan narsa bunaqa yozilmasligini judayam yaxshi bilib turibsizku
0
Akbarali
#150
TimX, # TimX (01.06.2020 / 14:27)
Akbarali, Men so'ragan narsa bunaqa yozilmasligini judayam yaxshi bilib turibsizku
нимани сураган эдингиз ?
0
TimX
#151
Akbarali, # Akbarali (01.06.2020 / 18:42)
TimX, нимани сураган эдингиз ?
SEO uchun 301 redirect. www ni http:// qilib o'zgartiradigan. Masalan: www.site.uz emas http://site.uz bo'lishi kerak. Agar ushbu redirect sozlanmasa, qidiruv tizimlari bu ikkisini ikki xil sayt sifatida qabul qiladi. Bu esa SEO uchun minus
1
8125
code_one
#152
kHakimzhon, # kHakimzhon (21.04.2020 / 19:53)
Hullas .htaccess ga http pratakoldan https pratakolga yo’lash uchun kod yozilgan i other/page.php ni page.php ga alishtirish kodi yozilgan shu htaccess orqali urli taxrirlangan sahifaga http pratakol
.htaccess orqali URL nomini o'zgartirish:

bu koddan keyin www.sayt.com/jild/muqova.php joriy manzilga o'zgaradi: sayt.com/muqova.php

manimcha siz shuni suragansiz bu bumasa uzur
98 kun 23 soat 40 daqiqa 9 soniyadan keyin yozdi:
https ni ololmayapman yordam kerak

shundan keyin buni yozsam sayt ishlamay qolyapti

maqsadim https olish ssl sertitikat olingan
0
Kod · PHP1 qator
RewriteRule ^muqova.php$ /jild/muqova.php [L]
Kod · PHP107 qator
Options -Indexes

ErrorDocument 402 /?err

ErrorDocument 403 /?err

ErrorDocument 404 /?err

ErrorDocument 500 /?err

DirectoryIndex index.php



RemoveHandler .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py

AddType application/x-httpd-php-source .phtml .php3 .php4 .php5 .php6 .phps .cgi .pl .asp .aspx .shtml .shtm .fcgi .fpl .jsp .py



AddDefaultCharset UTF-8



<IfModule mod_expires.c>

    ExpiresActive on

    ExpiresDefault                                      "access plus 1 month"



  # CSS

    ExpiresByType text/css                              "access plus 1 year"



  # Data interchange

    ExpiresByType application/json                      "access plus 0 seconds"

    ExpiresByType application/ld+json                   "access plus 0 seconds"

    ExpiresByType application/xml                       "access plus 0 seconds"

    ExpiresByType text/xml                              "access plus 0 seconds"



  # Favicon (cannot be renamed!) and cursor images

    ExpiresByType image/x-icon                          "access plus 1 week"



  # HTML components (HTCs)

    ExpiresByType text/x-component                      "access plus 1 month"



  # HTML

    ExpiresByType text/html                             "access plus 0 seconds"



  # JavaScript

    ExpiresByType application/javascript                "access plus 1 year"



  # Manifest files

    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"

    ExpiresByType text/cache-manifest                   "access plus 0 seconds"



  # Media

    ExpiresByType audio/ogg                             "access plus 1 month"

    ExpiresByType image/gif                             "access plus 1 month"

    ExpiresByType image/jpeg                            "access plus 1 month"

    ExpiresByType image/png                             "access plus 1 month"

    ExpiresByType video/mp4                             "access plus 1 month"

    ExpiresByType video/ogg                             "access plus 1 month"

    ExpiresByType video/webm                            "access plus 1 month"



  # Web feeds

    ExpiresByType application/atom+xml                  "access plus 1 hour"

    ExpiresByType application/rss+xml                   "access plus 1 hour"

</IfModule>
Kod · PHP5 qator
RewriteEngine On

RewriteCond %{HTTPS}!on

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
gi8ri7
#153
Hullas, RewriteRule orqali "domain.com/info.php" "domain.com/info" ga yo'naltirilgan, agar ohiriga slash qo'yib "domain.com/info/" kirilsa 404 ga jo'natib yuboryabdi bunaqa RewriteRulelar juda ko'p shuni bittada slashsiz ham slash bilan ham kiradigon qilish kerak. Harnarsa qib ko'rdim
0
Akbarali
#154
Kradoff ⁾, kodni tashlang
1
Clever
#155
Kradoff ⁾, # Kradoff ⁾ (20.11.2021 / 05:08)
Hullas, RewriteRule orqali "domain.com/info.php" "domain.com/info" ga yo'naltirilgan, agar ohiriga slash qo'yib "domain.com/info/" kirilsa 404 ga jo'natib yuboryabdi bunaqa RewriteRulelar juda ko'p sh
$ belgisi oldidan ? belgisini qo'shib qo'ysangiz, ya'ni bunday holatda ?$ o'sha sahifaga slash qo'ysangiz ham, qo'ymasangiz ham ishlayveradi.

Kodga na'muna:
1
Kod · PHP1 qator
RewriteRule ^id([0-9]+)?$ /user/anketa.php?id=$1 [L,QSA]
tahrirlandi · лет oldin
gi8ri7
#156
Clever, Ishlamadi
0

#157
0
Kod · PHP249 qator
AddDefaultCharset UTF-8

RewriteEngine On

DirectoryIndex index.php



## EXPIRES CACHING ##

# Включаем кэш в браузерах посетителей

<ifModule mod_headers.c>

    # Все html и htm файлы будут храниться в кэше браузера один день

    <FilesMatch "\.(html|htm)$">

        Header set Cache-Control "max-age=43200"

    </FilesMatch>

    # Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю

    <FilesMatch "\.(js|txt)$">

        Header set Cache-Control "max-age=604800"

    </FilesMatch>

    # Все флэш файлы и изображения будут храниться в кэше браузера один месяц

    <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|svg)$">

        Header set Cache-Control "max-age=2592000"

    </FilesMatch>

    # Отключаем кеширование php и других служебных файлов

    <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">

        Header unset Cache-Control

    </FilesMatch>

</IfModule>



<ifModule mod_expires.c>

    ExpiresActive On

    #по умолчанию кеш в 5 секунд

    ExpiresDefault "access plus 5 seconds"

    # Включаем кэширование изображений и флэш на месяц

    ExpiresByType image/x-icon "access plus 1 month"

    ExpiresByType image/jpeg "access plus 4 weeks"

    ExpiresByType image/png "access plus 30 days"

    ExpiresByType image/gif "access plus 43829 minutes"

    ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"

    # Включаем кэширование css, javascript и текстовых файлов на одну неделю

    ExpiresByType text/javascript "access plus 604800 seconds"

    ExpiresByType application/javascript "access plus 604800 seconds"

    ExpiresByType application/x-javascript "access plus 604800 seconds"

    # Включаем кэширование html и htm файлов на один день

    ExpiresByType text/html "access plus 43200 seconds"

    # Включаем кэширование xml файлов на десять минут

    ExpiresByType application/xhtml+xml "access plus 600 seconds"

</ifModule>



## EXPIRES CACHING ##

#Редирект с протокола http на https.#

RewriteCond %{HTTPS} off

RewriteCond %{HTTP:X-Forwarded-Proto} !https

RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

#Редирект с www на без www.#

RewriteCond %{HTTP_HOST} ^www.oscore.ga

RewriteRule (.*) https://oscore.ga/$1 [R=301,L]

#Редирект с index.php#

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/

RewriteRule ^index\.php$ https://oscore.ga/ [R=301,L]





# Настройка

RewriteRule ^change/password$ modules/settings.php?act=password [L,QSA]

# Сообщения

RewriteRule ^messages$ modules/messages.php [L,QSA]

RewriteRule ^messages/write/([0-9]*)$ modules/messages.php?act=write&id=$1 [L,QSA]

RewriteRule ^messages/view/([0-9]*)$ modules/messages.php?act=view&id=$1 [L,QSA]

# Комментарии

RewriteRule ^comments/delete/([0-9]*)$ modules/comments.php?act=dell&id=$1 [L,QSA]

RewriteRule ^edit/comment/([0-9]*)$ modules/comments.php?act=reads&id=$1 [L,QSA]

RewriteRule ^comments/reply/([0-9]*)$ modules/comments.php?act=otvet&id=$1 [L,QSA]

RewriteRule ^comments/quote/([0-9]*)$ modules/comments.php?act=citat&id=$1 [L,QSA]

# Анкета

RewriteRule ^profile/([0-9]*)$ modules/profile.php?id=$1 [L,QSA]

RewriteRule ^profile/themf/([0-9]*)$ modules/ank.php?act=themf&id=$1 [L,QSA]

RewriteRule ^profile/themk/([0-9]*)$ modules/profile.php?act=themk&id=$1 [L,QSA]

RewriteRule ^profile/simpa/([0-9]*)$ modules/profile.php?act=simpa&id=$1 [L,QSA]

# Авторизация

RewriteRule ^sign-in$ modules/system.php?act=login [L,QSA]

RewriteRule ^sign-up$ modules/system.php?act=registration [L,QSA]

RewriteRule ^sign-out$ modules/system.php?act=exit [L,QSA]

RewriteRule ^sign-up/referral/([0-9]*)$ modules/system.php?act=reg&ref=$1 [L,QSA]

# UPLOAD

RewriteRule ^upload/avatar$ modules/upload.php?act=avatar [L,QSA]

RewriteRule ^upload/file/([0-9]*)$ modules/upload.php?act=file&id=$1 [L,QSA]

# Биллинг

RewriteRule ^billing$ modules/billing.php [L,QSA]

RewriteRule ^billing/services$ modules/billing.php?act=services [L,QSA]

RewriteRule ^billing/services/grad$ modules/billing.php?act=grad [L,QSA]

RewriteRule ^billing/services/podc$ modules/billing.php?act=podc [L,QSA]

RewriteRule ^billing/services/username$ m/billing.php?act=editnick [L,QSA]

RewriteRule ^billing/send$ modules/billing.php?act=perevod [L,QSA]

RewriteRule ^billing/send/([0-9]*)$ m/billing.php?act=perevod&id=$1 [L,QSA]

RewriteRule ^billing/send/([0-9]*)/([0-9.]*)$ modules/billing.php?act=perevod&id=$1&summa=$2 [L,QSA]

# info 

RewriteRule ^rules$ modules/faq.php?act=rules [L,QSA]

RewriteRule ^onlines$ modules/users.php?act=online [L,QSA]

RewriteRule ^users$ modules/users.php?act=list [L,QSA]

# Кабинет

RewriteRule ^office?$ modules/office.php [L,QSA]

RewriteRule ^change/avatar$ modules/settings.php?act=avatar [L,QSA]

RewriteRule ^profile/edit$ modules/settings.php?act=profile [L,QSA]

RewriteRule ^profile/edit/contact$ modules/settings.php?act=contact [L,QSA]



RewriteRule ^office/referral$ modules/office.php?act=referral [L,QSA]

RewriteRule ^notifications$ modules/office.php?act=lenta [L,QSA]

RewriteRule ^office/settings$ modules/office.php?act=sett [L,QSA]

# Форум

RewriteRule ^forum$ modules/forum.php [L,QSA]

RewriteRule ^forum/add/category$ modules/forum.php?act=add-category [L,QSA]

RewriteRule ^forum/([0-9]*)$ modules/forum.php?act=category&id=$1 [L,QSA]

RewriteRule ^forum/add/subforum/([0-9]*)$ modules/forum.php?act=add-subforum&id=$1 [L,QSA]

RewriteRule ^forum/([A-Za-z0-9-]+)-([0-9]*)$ modules/forum.php?act=subforum&id=$2 [L,QSA]

RewriteRule ^forum/create/([0-9]*)$ modules/forum.php?act=create-topic&id=$1 [L,QSA]

RewriteRule ^topic/([A-Za-z0-9-]+)-([^/]+)-([0-9]*)?$ modules/forum.php?act=topic&id=$3 [L,QSA]

# js

RewriteRule ^to/likes$ system/ajax/like.php [L,QSA]

RewriteRule ^to/delete-file$ system/ajax/delete-file.php [L,QSA]

RewriteRule ^to/podpsus$ system/ajax/podpsus.php [L,QSA]

RewriteRule ^to/add-bookmarks$ system/ajax/add-bookmarks.php [L,QSA]

RewriteRule ^to/sortkomm$ system/ajax/sortkomm.php [L,QSA]

RewriteRule ^to/office/redkont$ system/ajax/office.php?act=redkont [L,QSA]



ErrorDocument 400 /modules/error.php?code=400

ErrorDocument 401 /modules/error.php?code=401

ErrorDocument 403 /modules/error.php?code=403

ErrorDocument 404 /modules/error.php?code=404

ErrorDocument 500 /modules/error.php?code=500
tahrirlandi · лет oldin
Akbarali
#158
Kradoff ⁾, RewriteRule ^office/?$ modules/office.php [L,QSA] ishlatib ko`ringchi
1
tahrirlandi · лет oldin