2017-02-07 14 views
0

ページの書き換えモジュールに関する助けが必要です。書き換えURLの変更

http://www.3esdesign.com/portfolio/budynki?projekt=koncepcja-hotelu-roznow 

「koncepcja-hotelu-roznowは、」他のページに切り抜いただろう
http://www.3esdesign.com/portfolio/budynki/koncepcja-hotelu-roznow 

のように見えます私は私のリンクにしたい:私は下に書くように私は私のURLを変更したいと思います。

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^\.]+)$ $1.php [NC,L] 
RewriteCond %{HTTP_HOST} ^domena.com(.*) [NC] 
RewriteRule ^(.*)$ http://www.domena.com/$1 [R=301,L] 

私はメインディレクトリにこのコードをしようとしている

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^([^\.]+)$ $1.php [NC,L] 
RewriteRule ^portfolio/([\w-]+)/([\w-]+)$ portfolio/$1.php?projekt=$2 [L] 
RewriteCond %{HTTP_HOST} ^3esdesign.com(.*) [NC] 
RewriteRule ^(.*)$ http://www.3esdesign.com/$1 [R=301,L] 

Serwerログ:

これは私の実際のhtaccessのコードです

[Tue Feb 07 11:25:31.379189 2017] [autoindex:error] [pid 55:tid 139960610965248] [client 82.115.92.43:59639] AH01276: Cannot serve directory /home/parkwnetrz/ftp/3esdesign/portfolio/: No matching DirectoryIndex (index.php,index.php4,index.php3,index.php5,index.cgi,index.pl,index.htm,index.html,index.shtm,index.shtml,index.wml,default.htm,default.html,index_default.html,index_default.php) found, and server-generated directory index forbidden by Options directive 
[Tue Feb 07 11:16:50.028891 2017] [proxy_fcgi:error] [pid 27:tid 139960527038208] [client 185.85.239.157:58525] AH01071: Got error 'Primary script unknown\n' 
[Tue Feb 07 11:13:52.304869 2017] [core:alert] [pid 55:tid 139960594179840] [client 82.115.92.43:59262] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:41.164930 2017] [core:alert] [pid 55:tid 139960602572544] [client 40.77.167.42:17519] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:16.105461 2017] [core:alert] [pid 27:tid 139960476681984] [client 82.115.92.43:59249] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:15.897717 2017] [core:alert] [pid 27:tid 139960485074688] [client 82.115.92.43:59249] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:15.704692 2017] [core:alert] [pid 27:tid 139960527038208] [client 82.115.92.43:59249] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:15.465792 2017] [core:alert] [pid 27:tid 139960535430912] [client 82.115.92.43:59249] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:13:14.926891 2017] [core:alert] [pid 27:tid 139960569001728] [client 82.115.92.43:59249] /home/parkwnetrz/ftp/3esdesign/.htaccess: Invalid command '^portfolio/([\\w-]+)/([\\w-]+)$', perhaps misspelled or defined by a module not included in the server configuration 
[Tue Feb 07 11:05:21.923535 2017] [autoindex:error] [pid 55:tid 139960468289280] [client 82.115.92.43:49537] AH01276: Cannot serve directory /home/parkwnetrz/ftp/3esdesign/portfolio/: No matching DirectoryIndex (index.php,index.php4,index.php3,index.php5,index.cgi,index.pl,index.htm,index.html,index.shtm,index.shtml,index.wml,default.htm,default.html,index_default.html,index_default.php) found, and server-generated directory index forbidden by Options directive 

答えて

0

はseperatly以下の条件でそれを試してみてください、

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^portfolio/([\w-]+)/([\w-]+)$ portfolio/$1.php?projekt=$2 [L] 
+0

エラーは何ですか?あなたはhtaccess –

+0

をどこに適用しているのですか?portfoilioディレクトリの.htaccessを使用していると思いますか? –

+0

.htaccessファイルをメインディレクトリにある、uが私のサーバー上で試すことができます。 [リンク](http://www.3esdesign.com/portfolio/budynki?projekt=koncepcja-hotelu-roznow) – Lesiu