【问题标题】:How to solve .htaccess get variable in php issue?如何解决 .htaccess 在 php 问题中获取变量?
【发布时间】:2017-01-10 10:43:09
【问题描述】:

这是我的 pages.php 代码,但它在 wamp 服务器中为我的所有 cms 文件提供了 500 Internal Server Error。另一方面,如果我删除这个 .htaccess 文件,cms 工作正常。但我想要一个漂亮的 url 来获取变量。 请帮助

Options +FollowSymlinks
RewriteEngine on

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

RewriteRule ^page_id/(\w+)$./pages.php?id=$1

在php中获取变量

$page_id = $_GET["id"];

【问题讨论】:

  • 你的 PHP 代码在哪里?

标签: php .htaccess url mod-rewrite get


【解决方案1】:
猜你喜欢
  • 2010-09-25
  • 1970-01-01
  • 1970-01-01
  • 2020-01-19
  • 2013-01-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多