mod-rewrite

    1热度

    2回答

    我htaccess文件充满了301重定向,像这样的: Redirect 301 /old-page.html https://www.example.com/new-page 有这些重定向的约100。我想这样做的是重定向所有流量将旧网站去新网站除了现有的301的 所以,如果有人去old-site.com/old-page.html它会带他们到new-site.com/new-page,如果有人去o

    -1热度

    1回答

    如何重定向以删除域名和.html文件名称之间的所有中间文件夹,而不必在每个重定向中明确添加多个规则。 基本上我希望两个: example.com/category/product.html example.com/category/sub-category/product.html 重定向到 example.com/product.html 我还想: example.com/category/su

    0热度

    1回答

    我正在使用AngularJS制作web应用程序。对于路由,我使用htaccess重写规则来允许直接访问路由页面(例如直接进入/设置)。然而,我想从这个规则中排除一个文件夹,所以我可以检查一个文件是否存在(现在每个URL都返回200)。我已经尝试了所有可以找到的重写条件和规则的组合,但没有运气。 到目前为止,这是我的.htaccess文件 <IfModule mod_rewrite.c> Rewr

    0热度

    2回答

    我在codeigniter url重写时遇到了一些问题。 问题是,standart htaccess重写在这里不起作用。 我想这htaccess的重写本: http://www.example.com/home/results?date=2017-10-02 要 http://www.example.com/home/results/2017-10-02 感谢您的帮助! 这不工作: Rew

    1热度

    1回答

    我有一个网站,例如:example.com 我想用的.htaccess的URL重定向到B网址: 一个:/global/index.php?option =大约 b:/ news/group/13/ 我测试&搜索很多次但没有结果! 这是我的代码: RewriteEngine on RedirectMatch ^(.*)about(.*)$ http://example.com/news/grou

    0热度

    1回答

    这里是我的.htaccess代码: RewriteEngine On RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC] RewriteRule^%1 [R=301,L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L]

    0热度

    1回答

    我使用这个的.htaccess用于删除.PHP在我的网址 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.php [NC,L] 我的文件结构是这样的: css/ es/ -- contact.php -- index.html js/ contact.php index

    2热度

    1回答

    从URL与图案 - http://example.com/top-100-selenium-interview-questions-answers.html?format=pdf 我想重定向到 的http:// example.com/istqb_dump.pdf 我已经创建了下面的规则重定向。 RewriteCond %{QUERY_STRING} format=pdf [NC] Rewrit

    1热度

    1回答

    我有这个代码在.htaccess项目: # If the requested filename exists, simply serve it. # We only want to let Apache serve files and not directories. RewriteCond %{REQUEST_FILENAME} -f RewriteRule^- [L] # Rewri

    0热度

    1回答

    我总是重定向到https://www.example.ch在一个单一的重定向。 现在,我使用我的网址别名多次重定向到最终的URL 。重定向链是这样的: Status Code URL IP Page Type Redirect Type Redirect URL 302 http://www.xn--exmple-icb.ch/ 5.9.75.43 server_redirect tempor