India
|
Edited by DarkNinja at 2015-5-21 09:18
I have enabled SEO for all pages by going to Admin CP > Global > SEO. Then clicked on "View current rewrite rules" and copied all the content under my host (Apache, Virtual host). Then created a new file .htaccess in the root directory of my host and pasted all the code in this file. But after saving it, when I try to access my site, I get internal 500 error. Here is the code that I have pasted in the file:
- # Enable RewriteEngine module
- RewriteEngine On
- # Modify the following statement for real
- discuz directory at your server, if the Discuz
- is installed at the root, change to "/"
- RewriteBase /discuz
- # Rewrite rules, do not modify the system
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^topic-(.+)\.html$ portal.php?
- mod=topic&topic=$1&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^article-([0-9]+)-([0-9]+)\.html
- $ portal.php?mod=view&aid=$1&page=$2&%
- 1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^forum-(\w+)-([0-9]+)\.html$
- forum.php?mod=forumdisplay&fid=$
- 1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^thread-([0-9]+)-([0-9]+)-([0-9]
- +)\.html$ forum.php?mod=viewthread&tid=$
- 1&extra=page\%3D$3&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^group-([0-9]+)-([0-9]+)\.html$
- forum.php?mod=group&fid=$1&page=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^space-(username|uid)-(.+)
- \.html$ home.php?mod=space&$1=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^blog-([0-9]+)-([0-9]+)\.html$
- home.php?mod=space&uid=$1&do=blog&id=$
- 2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^archiver/(fid|tid)-([0-9]+)
- \.html$ archiver/index.php?action=$
- 1&value=$2&%1
- RewriteCond %{QUERY_STRING} ^(.*)$
- RewriteRule ^([a-z]+[a-z0-9_]*)-([a-z0-9_\-]+)\.html$ plugin.php?id=$1:$2&%1
Copy the Code
|
|