![](/img/trans.png)
[英]Page 403 Forbidden for root directory for Deny from all in .htaccess
我在根目錄中有下一個.htaccess 並為www.example.com獲取 Page 403 Forbidden 而不是www.example.com/index.php 。 URL www.example.com/index.php可用。 關閉對根目錄中所有文件的訪問。 這些文件由腳本生成 ...
[英]Page 403 Forbidden for root directory for Deny from all in .htaccess
我在根目錄中有下一個.htaccess 並為www.example.com獲取 Page 403 Forbidden 而不是www.example.com/index.php 。 URL www.example.com/index.php可用。 關閉對根目錄中所有文件的訪問。 這些文件由腳本生成 ...
[英]NGINX nice url configuration
在 NGINX 上,我試圖弄清楚如何在重定向到 php 文件后在地址欄中保留漂亮的 URL。 我已經在代碼中嘗試了下面提到的所有方法並且它工作正常但無論是否使用重定向或代理,我仍然在地址欄中看到www.mydomain.com/products.php 。 我需要讓地址看起來像www.mydomai ...
[英]Rewriting a url that matches a specific pattern
我有一個.htaccess文件,其中包含以下幾行 我試圖找到任何以模式(mcc-[\d]+)結尾的 url 並將其重定向到show.php?id=%pattern% ,但是嘗試訪問與此模式匹配的頁面只會返回 404 錯誤因為沒有文件mcc-* 。 ...
[英]Does Wordpress' Rewrite API Break with RewriteBase other than Root?
我在嘗試讓 Wordpress 使用基本重寫規則時遇到了麻煩。 我在插件目錄中有一個 php 頁面,它需要接收一個 ID 號,以便它可以查找相關記錄。 我希望用戶訪問 url example.com/redirect/{redirectid},它應該提供一個在 example.com/wp-con ...
[英]Htaccess - remove .php extension and keep query
我試圖刪除.php擴展名並保留id查詢參數,但出現 404 錯誤。 這是 URL: 我希望它是: 這是我的.htaccess文件: ...
[英]Understanding the mod rewrite [SMF forum] [Pretty URLs Mod]
我在我的域目錄的根目錄中安裝了 SMF,門戶充當我網站的前端。 Portal = Home [mydomain.com] SMF = Forum [mydomain.com/forum/] 該門戶創建自定義頁面,類似於“index.php?page=page3457”。 我想知道是否可以使用 S ...
[英].htaccess pretty url for blog
我需要有關博客的幫助,該博客位於核心 php 中,並希望使用 .htaccess 創建一個漂亮的 url 我有一個名為 blog 的文件夾,其中有兩個文件。 index.php 是一篇博客頁面文章。php 顯示一篇博客文章所以我想要實現的是有人訪問 https://example.com/blog ...
[英]there is an error of htaccess configuration
這是地址欄上的鏈接: 這是.htaccess的代碼: 現在我無法理解這段代碼有什么問題。 因為當我嘗試從地址欄中的 url 之類的數據庫訪問新聞時,這不起作用: 這是顯示 404 錯誤。 ...
[英]Getting list of friendlyURL and aspx page they belong to from RouteConfig.cs
我想知道是否有一種實現的方法可以從 RouteConfig.cs 獲取對象列表,其中我將有實際的 aspx 頁面名稱,並且它是友好的 URL 等效項。 我們經常使用 URL 中的頁面名稱,並且總是檢查 URL 是否在路徑或友好 URL 中包含 aspx 頁面名稱,因為從技術上講,這些頁面可以使用兩種 ...
[英]#PHP How do I create conditions for .htaccess
首先抱歉,我使用谷歌翻譯。 我有 *.php domainname.com/filename.php domainname.com/file1.php?a=aa&b=bb domainname.com/file2.php?a=cc 我想把它改成 domainname.com/filen ...
[英]Htaccess rule for pretty url in sub folder html file
我目前正在嘗試制作漂亮的 url 並且我從其他帖子中復制了一些代碼並成功使用以下代碼重寫 它將我的主文件夾 g.html?name=this 更改為 g/this 但我需要在 /sub/w.ZFC35FDC70D5FC69D269883A822C7A53E 的子文件夾中重寫 html 文件。 ...
[英]htaccess change subfolder root with subfolder
我有一個網站example.com ,結構如下: public_html/.htaccess的內容是: public_html/project/.htaccess的內容是: 實際結果當 url 為example.com時,我可以看到public_html/index.php 當 url 是exa ...
[英]How to make a nested folder of a subdomain subfolder the web root using .htaccess?
我正在嘗試將子域子文件夾的嵌套文件夾設置為 web 根目錄,以便測試應用程序正常工作。 我目前使用 .htaccess 的嘗試: 首選結果:當我訪問test.example.com/myapp/時,它應該顯示視圖文件夾中的內容。 有這種工作的可能性嗎? 我知道這將在根域上工作,但我需要它在子域子文 ...
[英]Htaccess - manage catch all in multiple directories and one single htaccess file
我正在嘗試根據特定關鍵字在多個目錄中調度所有流量。 我有以下目錄結構: 我在 dotcom 中有一個 .htaccess 文件,我想將每個目錄后面的所有內容重定向到每個目錄中的索引文件。 例子: 不在現有目錄之一中的任何內容都應重定向到 dotcom/index.php 我為 dotcom 嘗試了以 ...
[英]RewriteRule to capture whole search string produces empty result
我在 .htaccess 中有以下規則: RewriteRule ^order(.*)$ /index.php?p=order&product=$1 [L,NC] 這是一個簡化,因為稍后我想添加order\?product=(.*) 我通過以下方式訪問該網站: http://website ...
[英].htaccesss: allow to load resource files
我嘗試執行以下操作。 拒絕直接訪問 example.domain.com 允許從 another.domain.com 訪問 example.domain.com 允許在用戶從 another.domain.com 到 example.domain.com 時加載資源文件(css、js) 第 1 點 ...
[英]Nginx Friendly URL File Extension
我得到了我的 nginx.conf 文件: 我想用 seo 優化的鏈接替換友好的 url(由 php 文件生成)鏈接。 搜索引擎需要文件擴展名,所以我需要讓它看起來像這樣: 不幸的是,我不能這樣做,因為 nginx 會拋出 404 錯誤。 任何想法如何將鏈接https://exampl ...
[英]Use ReWriteEngine to redirect user profile page to a physical page
再會, 我想將我的用戶 ID URL 重寫為我網站上的物理頁面,請參見下面的 URL 結構: 來自:http://localhost:8888/report.mark1/user.php?id=341 至:http://localhost:8888/report.mark1/341 這是 . ...
[英]RewriteRule - remove params keys and keep values in address bar
上面的行有效 example.com/video被解釋為example.com/video.php 現在我需要example.com/video?id=5&s=lorem-ipsum 解釋為example.com/video/5/lorem-ipsum - 反之亦然 不起作用 - 在兩個方 ...