Thread View: pl.comp.www.server-side
1 messages
1 total messages
Started by Jivanmukta
Fri, 13 Sep 2019 18:14
pretty urls
Author: Jivanmukta
Date: Fri, 13 Sep 2019 18:14
Date: Fri, 13 Sep 2019 18:14
61 lines
1802 bytes
1802 bytes
Jestem kiepski z mod_rewrite. Próbuję napisać regułę tłumaczącą adres
localhost/~robert/invoice-a6c34n1x98.html
na adres
localhost/~robert/announcement/invoice?c=a6c34n1x98
Napisałem tak:
RewriteRule ^invoice-([a-zA-Z0-9]*)\.html$
/announcement/invoice?c=$1 [L]
i dostaję 404 Not Found. Nie wiem co robię źle. Oto mój cały .htaccess:
#v+
AuthUserFile "/home/robert/rozgloszenia/application/resources/.htpass"
AuthName "Strony zabezpieczone"
AuthType Basic
require valid-user
DirectoryIndex index.php
RewriteEngine on
RewriteBase /~robert/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|robots\.txt|denial\.html|resources|captcha)
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
RewriteRule ^invoice-([a-zA-Z0-9]*)\.html$ /announcement/invoice?c=$1 [L]
php_value upload_max_filesize 75M
php_value post_max_size 100M
#v-
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads