我想要將我的filename.php更改爲文件名/通過.htaccesss。.htaccess隱藏.php文件擴展名,顯示/(斜槓)而不是
所以,http://labs.ksj-oepites-zomergem.be/info.php#/deleiding 應該成爲http://labs.ksj-oepites-zomergem.be/info/#/deleiding
我有什麼:
Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase/
# 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 [NC]
RewriteRule^%{REQUEST_URI}.php [L]
### 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} !-f
RewriteRule ^([-a-zA-Z0-9]+)\/$ $1.php [L]
此代碼將改變filename.php到名和NOT 文件名/
在我的.htaccess中使用此代碼,我的網站將不會作爲標準人。 當我調用一個php文件在javascript中使用ajax ..我得到一個'意想不到的EOF'
任何建議?!的