domain_name / directory_name / file_name /からhttp://xx.xx.xx.x/project_name/controller/にリダイレクトしたいのですが、URLにdomain_name / directory_name / file_name /を表示したいと思います。そのために私は.htaccessファイルに次のコードを書きます
RewriteEngine On
RewriteCond %{HTTP_HOST} !directory_name/file_name/$ [NC]
RewriteRule ^(.*)$ http://xx.xx.xx.x/project_name/controller/$1 [P]
私が書くとき
RewriteEngine On
RewriteCond %{HTTP_HOST} !directory_name/file_name/$ [NC]
RewriteRule ^(.*)$ http://xx.xx.xx.x/project_name/controller/$1 [L,R=301]
そして、それはdirectory_nameにから/ file_nameに/へのリダイレクトです//xx.xx.xx.x/project_name/controller/ます:httpけど示すにhttp://xx.xx.xx.x/project_name/controller/ URLでは。
そのために、http://www.inmotionhosting.com/support/website/htaccess/redirect-without-changing-urlサイトの参照として[L、R = 301]を[P]に変更しましたが、次のエラーが発生します
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at [email protected] to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.
私を助けてください。それは大きな助けになるでしょう。
答えがありました。mod_proxy_httpApacheモジュールを有効にするだけです。
Go to your httpd.conf file and uncomment proxy_http_module
Restart wamp
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加