0
こんにちは、私はhtaccessに問題があります。Htaccessはうまくいきません - 良いURL
私はこのURLから必要domain.com/index?article=28&title=velky-biel-karlova-ves
(私はhtaccessファイルで拡張子.phpを隠すので、それがdoesn'tのindex.phpを持っている。
を、私はこのURL domain.com/clanok/28/velky-biel-karlova-ves
私はこのコードを使用していたい
私のhtaccessファイル:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^clanok/([\d]+)/([\w-]+)/?$ index.php?article=$1&title=$2 [NC,L]
RewriteBase/
## hide .php extension
# To externally redirect /dir/foo.php to /dir/foo
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule^%1 [R,L,NC]
## To internally redirect /dir/foo to /dir/foo.php
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule^%{REQUEST_URI}.php [L]
私のindex.phpファイル:
<a href="index.php?article=<?php echo urlencode($row['id']); ?>&title=<?php echo createSlug($row['title']); ?>" title="">
これは機能しません。
Thxヘルプ。
エラー/ prolemとは、現在の '.htaccess'も提供します。 –
私はあなたの質問にこれを置くことができません –
私は私の質問を変更しました。 – Forlis