使用htaccess隐藏网址的某些部分

时间:2017-01-22 13:29:41

标签: .htaccess url-rewriting

我有以下htaccess文件,适用于我的应用程序:

let modelVC = self.storyboard?.instantiateViewController(withIdentifier: "modalVC") as! ModalVC
let navBarOnModal: UINavigationController = UINavigationController(rootViewController: modalVC)
self.present(navBarOnModal, animated: true, completion: nil)

如何将http://example.com/de/contact之类的网址更改为 http://example.com/contact

我尝试过类似的事情:

Options -MultiViews
RewriteEngine On
Options -Indexes

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

0 个答案:

没有答案