跳转到主要内容
你行网

Main navigation

  • 首页
  • Drupal
  • 编程与开发
  • 数据库
  • 操作系统与应用
  • 服务器与运维
  • 社区
User account menu
  • 登录

面包屑

  1. 首页

在 Drupal 8 中从 URL 中删除 index.php

由 hrs, 27 五月, 2022

默认情况下在 URL 中添加 /index.php/ 以便如何从 Drupal 8 中的 URL 中删除 index.php

我在 .htaccess 文件中添加了以下代码,然后问题已解决

RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]

您可以尝试停止在 Google 或其他搜索引擎中将此类 URL 编入索引的其他方法

在 robots.txt 中添加以下代码

Disallow: /index.php/*

 

  • 登录或注册以发表评论

文章标签

  • Drupal

评论

文章标签

CSS
Excel
ubuntu
php
五笔
vim
Linux
VPN
command
HTML
drupal 8
drupal 7
centos
composer
Mysql
drush
模块(module)
Drupal
JavaSrcipt
apache
drupal 9
英语
nerdtree
SEO
network
果树种植
surround
drupal10
主题(theme)
ssh
phpmyadmin
yum
二进制
权限
声音
ssl
selinux
HTML5
password
Dreamweaver
flameshot
翻译
颜色
DDEV
uploadprogress
WireGuard
firewalld
kernel
视图(views)
快捷键
gzip
xdebug
错误
邮件验证
电脑基础
ckeditor
C语言
简介
mbstring
源地址
certbot
php扩展
git
httpd
apt
电子秤
压缩解压
表单
breadcrumb
AI
csharp
短信验证
摄影
superfish
重定向
diff
网站备份
docker
tagclouds
java
drupal 11
adsense
RSS
版本号
电脑技巧
simple_adsense
算法
端口
youtube
JavaScript
cookie
badblocks
计算机基础
网站运营
RFID
VUE
zip
gimp
form
dns
标签优化
mod_expires 模块
赚钱
ip
http验证
curl
重定向,301
netstat
字段
maven
input
npm
nginx
KVM
哈希值
wps
更多

相关文章

  • 在 Drupal 中权重(Weight)是怎样排序的
  • 解决 Drupal 主题缺失问题
  • Drupal Composer命令及作用总结
  • drupal 中的解耦菜单
  • drupal .htaccess 文件的配置解释
  • drupal启用大文件上传解决方案
  • 如何从基于 Drupal 的 CMS URL Linux 门户中删除 index.php
  • drupal 基本的目录结构
  • drupal index.php 的工作流程
  • drupal Index.php 的永久解决方法
RSS源

友情链接 网站地图 版权信息 联系我们 网址导航 社区

Copyright © 2019 - 2021 你行网 版权所有  粤ICP备19072650号