1

我想更改网址

http://www.example.com/option=com_content&view=propertyshow&pid=47610

http://www.example.com/index.php?option=com_content&view=propertyshow&pid=47610

我怎么能在 .htaccess 中做到这一点

4

1 回答 1

0

这应该做。

# Turn on URL rewriting
RewriteEngine On

# Installation directory
RewriteBase /

# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Rewrite all other URLs to index.php/URL
RewriteRule ^(.*)$ index.php?$1 [PT,L]
于 2012-10-08T18:29:59.477 回答