2016-07-10 2 views
0

私は自分のギャラリーのWebサイトでクリーンなURLを作成しようとしています。htaccessサブフォルダを持つURLをクリーンアップ

<http://sloanegalleryofart.com> 

私は一般的なナビゲーションをクリーンアップすることができました。サブフォルダ

を設定しようとしている間しかし、いくつかのハードコア困難で実行

Curretnly私のhtaccessファイルは、以下のようになりますので、

Options +FollowSymLinks 
RewriteEngine on 

RewriteBase/

RewriteCond %{HTTP_HOST} ^sloanegalleryofart.com$ [NC,OR] 
RewriteCond %{HTTP_HOST} ^www.sloanegalleryofart.com$ 
RewriteCond %{REQUEST_URI} !/ 
RewriteRule (.*) /$1 [L] 

RewriteRule ^about/$ /about/about.php 
RewriteRule ^contact/$ /contact/contact.php 
RewriteRule ^shows/$ /shows/shows.php 
RewriteRule ^artists/$ /artists/artists.php 
RewriteRule ^books/$ /books/books.php 

私はそれがとてもsloanegalleryofart.com/artists/artist.php?artist=Gleb-Bogomolov

のように見える、個々のアーティストにアーティストページ sloanegalleryofart.com/artistsから移動しようとした場合

理想的にはsloanegalleryofart.com/artists/Gleb-Bogomolov/にしたいと思っています。 URLからartist.php?artist=全体を切り取ってください。

ありがとうございます!

答えて

0

これは、あなたが http://sloanegalleryofart.com/artists/Gleb-Bogomolov
にアクセスすると、あなたが http://sloanegalleryofart.com/artists/artists.php?artist=Gleb-Bogomolov

+1

を見られます

RewriteRule ^artists/([0-9a-zA-Z\-]{1,})?/?$ /artists/artists.php?artist=$1 

ソリューションですありがとうございました! – user3183915

関連する問題