0
我需要幫助.htaccess文件和URL重寫。我在這裏搜索了所有的問題和答案,我堅持了它。使用.htaccess從URL中刪除空格和html特殊字符
所以我需要一個幫助,用-來替換空格%20來製作一個SEO友好的URL。
當前URL http://localhost/blog/Blog%20of%20the%20day
這裏是我的.htaccess文件
RewriteEngine On
# Removes .php extension from inner_blog.php
RewriteRule ^blog/?$ blog.php [NC]
# Remove inner_blog.php and changing it to blog/articlename
RewriteRule ^blog/([^/]*)$ /inner_blog.php?title=$1 [L]
# Need to replace %20 with - from URL
# Current URL http://localhost/blog/Blog%20of%20the%20day
# Need to be http://localhost/blog/Blog-of-the-day
# Was like http://localhost/inner_blog.php?title=Blog%20of%20the%20day
好吧,我有取代空白 - 但仍然我不是geeting乾淨URL –
anybosy可以解決這個問題 –