首页 文章
  • 0 votes
     answers
     views

    适用于Drupal&Boost和ImageCache的nginx配置

    UPD!!! :此主题完全解决了此处讨论的问题: http://groups.drupal.org/node/155564 并通过详细探索: 由Nginx和Drupal大师组成的 Nginx配置 - AntónioP . P. Almeida(Perusio) . https://github.com/perusio/drupal-with-nginx 无法解决以下问题:我有FreeBSD,Ap...
  • 3 votes
     answers
     views

    使用RewriteRegexRule和ResourceHandler在Jetty 9.3.6中重写URL

    我正试图让码头和角2一起工作 . 为此我需要服务器将所有index.html / ... urls重写为index.html我的配置是这样的: Server server = new Server(8080); HandlerCollection handlerCollection = new HandlerCollection(); RewriteHandler rewrite = new R...
  • 0 votes
     answers
     views

    查询为'index'时,htaccess重定向无法正常工作

    I am just learning mvc structure. In my mvc directory, I have a .htaccess file which contains this: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !...
  • 0 votes
     answers
     views

    在wordpress中找不到主页

    我在wordpress中的.htaccess中有以下代码 <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d Rewrit...
  • 0 votes
     answers
     views

    重写网址以添加“/”

    我知道如何重写网址以重定向到页面 . 当“/”不在www.DomainName.com/user/myUserName的末尾时,重定向工作: RewriteRule /$ /user/index.php 当我写RewriteBase /上面的规则不起作用,但是404错误 . 如何在 www.DomainName.com/user/myUserName/ 末尾添加 "/" 并仍...
  • 0 votes
     answers
     views

    HTML重写.htaccess文件

    当我使用.htaccess文件到我的根文件夹来重写URL时,它发生错误并得到了这个按钮“服务器遇到内部错误或配置错误,无法完成您的请求 . ” 我在.htaccess文件中使用此重写规则 Options +FollowSymLinks RewriteEngine on RewriteRule services services.html? http://www.domain.com/servi...
  • 1 votes
     answers
     views

    我想使用htaccess或php将旧网址重定向到新的重写网址

    我有一个问题,因为我使用重写网址.. 我的旧网址: Website.com/index.php?act=appdetail&appid=oWV 新重写网址 http://website.com/angry_birds_rio-appdetail-oWVi.html 但我所有的旧网址都在谷歌索引,如果有任何人来到我的网站,它显示旧的URL和谷歌也索引新的URL . 它在网站问题上制作重复页面...
  • 0 votes
     answers
     views

    .htaccess重写多个网址

    我需要帮助重写.htaccess文件中的重写 . 所以这就是我现在所拥有的这个有效但当我尝试添加一个新的RewriteRule时没有任何反应 . 我想要重写的网址是index.php?page = $ 1 RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteR...
  • 23 votes
     answers
     views

    mod_rewrite:删除尾部斜杠(只有一个!)

    我将mod_rewrite / .htaccess用于漂亮的URL . 我正在使用这个条件/规则来消除尾部斜杠(或者更确切地说:通过301重定向重写到非尾部斜杠URL;我这样做是为了避免重复内容,因为我喜欢不带尾随斜杠的URL更好): RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCon...
  • 0 votes
     answers
     views

    Nginx将http子域重定向到https

    我有一个域有3个子域: - example.com (main domain) - api.example.com - blog.example.com - support.example.com (just a cname to point to zendesk) 我在 Nginx 上有这3个配置: api # HTTP server server { listen ...
  • 0 votes
     answers
     views

    如何使用Nginx从另一个域提供页面

    我们已经有一个在 生产环境 中运行的现有域(my.domain1),我们想要创建另一个域,该域将托管在一个单独的服务器(my.domain2)中,该服务器将提供已从 生产环境 域中获得的页面 . 如果我访问“my.domain2 / my_account.html”,则nginx应该从“my.domain1 / profile.html”获取该页面的内容 . 不幸的是,我总是得到404消息 . 我...
  • 1 votes
     answers
     views

    具有自定义分类的自定义帖子类型的永久链接

    我有一个称为产品的自定义帖子类型,我将其重写为商店,我已经为称为产品类别的产品注册了分层分类 . 我希望我的永久链接看起来像 . mysite.com/store/cat-name/post-name 所以永久链接结构看起来像.. &post_type&/%taxonomy_name%/%post_name% 有没有办法在Wordpress 3.1中执行此操作?我正在运行最新的...
  • 1 votes
     answers
     views

    nginx重写使用last和break抛出404

    我的Yii网站有一个类似下面的虚拟主机 server { root /var/www/code; index index.php index.html; server_name mydomain.com; location / { rewrite ^/en/keyword$ /en/spesfic_contro...
  • 4 votes
     answers
     views

    使用Auth和Canonical重定向在Apache上强制SSL

    我已经阅读了一些关于如何重定向到SSL的帖子,还有一些关于如何确保网站使用www子域/规范名称的帖子,以及一些关于如何设置Basic Auth的帖子 . 这是我现在在.htaccess文件中的内容: RewriteEngine On RewriteCond %{HTTPS} !=on RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301...
  • 1 votes
     answers
     views

    对子域的所有子目录使用.htacess RewriteCond

    我如何为子域的所有子目录使用RewriteCond 示例: test.example.com/folder1/page1.php - > code.example/folder1/page1.php (在地址栏中显示test.example.com/folder1/page1.php) 我目前正在使用: RewriteCond %{HTTP_HOST} ^(.+)\.example\....
  • 1 votes
     answers
     views

    Apache重写规则删除具有代理反向的参数

    在重写规则和寻求帮助方面,我有点绿 . 我有要求做的事情: 使用apache作为反向代理 在参数黑客的情况下从网址中删除一些参数 . 我有一个网址,类似于: http://server.com/search?param1=xxxx&param2=yyyy&param3===zzzz 要么 http://server.com/search?param2=xxxx&...
  • 0 votes
     answers
     views

    更改Wordpress 3.5中自定义帖子的永久链接

    如果这个问题已经解决,请原谅我,但是我搜索过,这里提出的解决方案似乎都不符合我的情况 . 我有一个编程插件来创建一个名为“练习”的自定义帖子类型 . 当我第一次创建帖子时,插件会将 Headers 分配给帖子URL . 例如: mysite dot com/?exercise=pushups 永久链接设置是默认的 mysite dot com/?p=123 ,但插件会以某种方式将自定义帖子 He...
  • 0 votes
     answers
     views

    网址重写不起作用的htaccess

    这是我的htaccess代码: RewriteEngine On RewriteRule ^/typo3$ - [L] RewriteRule ^/typo3/.*$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l Re...
  • 0 votes
     answers
     views

    使用mod_rewrite重写URL:多个规则出错

    我在.htaccess中有以下代码 Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)(/([^/]+))?(...
  • 0 votes
     answers
     views

    php htaccess重写helpME请[关闭]

    那里 . 我是htaccess的新手 . 请帮我2写url重写这些链接 网址: url - index.php?page = news url - index.php?page = users&nickname = name url - index.php?cat =类别 url - index.php?cat = Category&seo-link = Title...
  • 2 votes
     answers
     views

    .htaccess使用查询字符串重写URL

    我已尝试在stackoverflow上发布了大量解决方案,但似乎没有什么对我有用 . 我想在我的网站上重写一些网址,以便对搜索引擎友好 . 我想要一个这样的URL: - http://www.mysite.com/index.php?filter=accounts显示为: - http://www.mysite.com/accounts 网络上的很多帖子都将此作为解决方案: - Rewrite...
  • 0 votes
     answers
     views

    htaccess url重写问题

    我成功地重写了用户 Profiles 页面: RewriteRule ^([a-z0-9])$ /profile/profile.php?u=$1 [NC] RewriteRule ^([a-z0-9])/ $ /profile/profile.php?u=$1 [NC ] 所以site.com/username是site.com/profile.php?u=username 简单 . 但现在.....
  • 0 votes
     answers
     views

    重写规则不工作.htaccess

    我有以下URL,我试图使SEO友好的URL . 我尝试了一些在线重写验证器,他们验证了我在.htaccess中编写的规则的完美性,但是在上传到我的服务器时它仍然无效 . 任何帮助都非常感谢 . 我希望 http://example.com/deal/de3582c47f/ 被重定向(实际上没有更改最终用户的URL)到 http://example.com/dealinfo.php?offerid=...
  • 1 votes
     answers
     views

    WordPress自定义永久链接结构:页面,帖子和自定义帖子类型

    我正在尝试根据自定义父/子分类法为自定义帖子类型设置自定义永久链接结构 . 我已经设法实现了这个目标,但我打破了页面和帖子的永久链接结构 . 我已完成以下任务: mysite.com/taxonomy_parent/taxonomy_child/postname 换句话说,我删除了分类标本,URL显示正确的层次结构顺序 . 首先,我在注册自定义分类法和自定义post-type时设置'rewrite...
  • 0 votes
     answers
     views

    htaccess,正则表达式,重写URL

    嗯我的.htaccess有问题,我想改写一下: http://domain.com/a/thread-103518.html#103518 对此 http://domain.com/a/103518 换句话说......我想删除“thread-”和“ . ”之后的所有内容 . / a /必须是变量的...还有/ bla /和/ code /的其他论坛 你有线索吗?谢谢 我的.htacce...
  • 0 votes
     answers
     views

    mod_rewrite:删除尾部斜杠(只有一个!)[复制]

    这个问题在这里已有答案: mod_rewrite: remove trailing slash (only one!) 4个答案 我将mod_rewrite / .htaccess用于漂亮的URL . 我正在使用这个条件/规则来消除尾部斜杠(或者更确切地说:通过301重定向重写到非尾部斜杠URL;我这样做是为了避免重复内容,因为我喜欢不带尾随斜杠的URL更好): RewriteCond %{R...
  • 3 votes
     answers
     views

    允许多个IP通过.htaccess访问Wordpress站点管理员

    我目前有一个正在升级的wordpress网站,我在.htaccess文件中有一个维护重定向设置 . 我可以允许自己的IP访问网站和管理员,但我如何允许其他编辑人员访问多个IP访问权限 . 我目前正在使用: RewriteEngine on RewriteCond %{REMOTE_HOST} !^123.456.789.101 #RewriteCond %{REMOTE_ADD...
  • 1 votes
     answers
     views

    htaccess正则表达式通配符重定向覆盖其他重定向

    我目前在htaccess中有以下重定向,我需要添加两个新的重定向 . 虽然看起来最后一个通配符重定向覆盖了我试图添加的两个新重定向 . 我该如何纠正?有什么建议?谢谢 . RewriteEngine On RewriteCond% ^ mydomain.com RewriteRule( . *)http://www.mydomain.com/ $ 1 [R = 301,L] RewriteRul...
  • 0 votes
     answers
     views

    htaccess重定向301重写冲突

    我有一个旧的域名(old.com),有很多动态网址和静态网址,这些网址在谷歌中位置很好 . 我有一个新的域名(new.cat),其中相同的内容有新的URL更友好 . old.com站点位于IIS主机中,因此我将其转移到带有apache的服务器,在那里我可以使用htaccess将旧URL重定向到新的URL . 我已经用数据库中的php完成了它,以便不用手写每条指令 . 示例动态旧网址==>新网...
  • 1 votes
     answers
     views

    规范URL和URL重写

    最近我正在阅读关于HTTP的内容,我遇到了URL重写和URL规范化 . 我读到当同一网页能够从多个URL加载时发生URL规范化错误,如: http://www.example.com http://www.example.com/ http://example.com http://example.com/ http://www.example.com/index.php 首先,谁确定键入http...

热门问题