| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 6799|Reply: 2
Collapse the left

about mod rewrite

[Copy link]

 China

Post time: 2013-01-13 06:58
| Show all posts |Read mode
本帖最后由 alen 于 2013-1-13 15:16 编辑

I use bluehost for my site.It support rewrite.
But i did it as instruction,failed.

My DZX2.5 is set up at public_html/forum

seo setting-URL-checked all,then submitted,cliked right above "rewrite '
I choosed Apache Web Server(virture) My host is linux  apache

RewriteEngine On
RewriteBase /forum
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} ^(.*)$

Then copied above to .htaccess,uploaded to public_html

Then updated cache.
But when i open the forum,i said 404 error.
Please help.






 Russia

Post time: 2013-01-14 09:59
| Show all posts
First of all, you have to verify, if the ModRewrite works ok.
SITE ROOT/.htaccess:
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteRule ^test.html$ test.php [L,QSA]
Copy the Code
SITE ROOT/test.php:
  1. <?php
  2. echo "this is test.php";
Copy the Code
Then go to
http://yoursite.com/test.html

If you see this: this is test.php
then your ModRewrite works ok.
Elsewhere ask your hosting support!

 China

 Author| Post time: 2013-01-19 08:35
| Show all posts
thanks
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-23 04:31 GMT+3 , Processed in 0.038153 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list