私はhtaccessにそのようなコードがあると考えてみましょう:
RewriteRule ^admin/registration/?$ admin/qeyd.php [NC,L]
RewriteRule ^admin/login/?$ admin/login.php [NC,L]
RewriteRule ^admin/profile/?$ admin/profile.php [NC,L]
しかし、「admin」の変数を定義して、次のように記述します。 admin_directory_variable = custom_name
RewriteRule ^custom_name/registration/?$ admin/qeyd.php [NC,L]
RewriteRule ^custom_name/login/?$ admin/login.php [NC,L]
RewriteRule ^custom_name/profile/?$ admin/profile.php [NC,L]
どうしたらいいですか?
回答:
回答№1は2作成する admin/.htaccess
これらのルールをファイルして使用します。
RewriteEngine On
RewriteBase /admin/
RewriteRule ^registration/?$ qeyd.php [NC,L]
RewriteRule ^(login|profile)/?$ $1.php [NC,L]
回答№2の場合は0
Apache 2.4には 定義する 次のように使用するキーワード:
Define name value
そしてこのように使う:
DocumentRoot ${name}
残念ながら、.htaccessファイルでは使用できません。を参照してください。 Apache2.4のドキュメント