• Bật Mod_rewrite trong VPSSIM

  • Thông báo lỗi bạn gặp và mọi người giúp fix.

Thông báo lỗi bạn gặp và mọi người giúp fix.
 #3301  by dungle79
 21 Nov 2018 21:27
Xin vui lòng hướng dẫn cách bật Mod_rewrite cho code của mình . Không biết thao tác thế nào trong VPSSIM
Get 25 USD Free To USE VPSSIM
 #3302  by olalavui
 21 Nov 2018 22:47
Mod_rewrite là modules bên Apache, vpssim xài nginx

và với các rules hiện tại của vpssim chạy được đa số các sources, không biết bạn xài mã nguồn gì nhỉ?

Tốt nhất bạn cứ cài code lên, upload database, config database chuẩn thì run ngon ngay mà
nguyenoanh liked this
 #3310  by dungle79
 22 Nov 2018 11:42
Nhưng khổ cái là mình xài code PHPMelody nên không chuyển sang thành URL SEO friendly được , bật chức năng đó lên là bị lỗi không chạy được clip mong muốn .
Vậy theo bạn, thì giải pháp thế nào là hiệu quả .
Mình thấy trong code đã có sẵn file ".htaccess-nginx" với nội dung như sau , nhưng sao hệ thống vẫn không xử lý được . Admin xem giúp nhé
Web: http:// mondeparfait. com
==> Nếu vậy có phải giải pháp là chạy về UBuntu không ?

"rewrite ^/index.html$ /index.php;
rewrite ^/browse.html$ /category.php;
rewrite ^/browse-(.*)-videos.html$ /category.php?cat=$1;
rewrite ^/browse-(.*)-videos-([0-9]+)-(.*).html$ /category.php?cat=$1&page=$2&sortby=$3;
rewrite ^/videos.flv(.*)$ /videos.php$1;
rewrite ^/videos.mp4(.*)$ /videos.php$1;
rewrite ^/register.html$ /register.php;
rewrite ^/contact_us.html$ /contact_us.php;
rewrite ^/edit_profile.html$ /edit_profile.php;
rewrite ^/suggest.html$ /suggest.php;
rewrite ^/upload.html$ /upload.php;
rewrite ^/upload_avatar.html$ /upload_avatar.php;
rewrite ^/suggest.html$ /suggest.php;
rewrite ^/favorites.html(.*)$ /favorites.php$1;
rewrite ^/playlists.html(.*)$ /playlists.php$1;
rewrite ^/login.html(.*)$ /login.php$1;
rewrite ^/newvideos.html(.*)$ /newvideos.php$1;
rewrite ^/topvideos.html(.*)$ /topvideos.php$1;
rewrite ^/profile.html(.*)$ /profile.php$1;
rewrite ^/user/([^/]+)/?$ /user.php?u=$1;
rewrite ^/user/([^/]+)/(.*)/?$ /user.php?u=$1&view=$2;
rewrite ^/playlist/(.*)/([^/]+)(/)?$ /watch.php?playlist=$1&vid=$2;
rewrite ^/playlist/(.*)$ /playlists.php?playlist=$1;
rewrite ^/memberlist.html(.*)$ /memberlist.php$1;
rewrite ^/articles/index-([0-9]+).html$ /article.php?page=$1;
rewrite ^/articles/browse-(.*)-([0-9]+).html$ /article.php?c=$1&page=$2;
rewrite ^/articles/tag/([^/]+)/page-([0-9]+)(/)?$ /article.php?tag=$1&page=$2;
rewrite ^/articles/tag/([^/]+)(/)?$ /article.php?tag=$1&page=1;
rewrite ^/articles/popular-([0-9]+).html$ /article.php?show=popular&page=$1;
rewrite ^/articles/(.*)_([0-9]+).html$ /article_read.php?a=$2;
rewrite ^/articles(/|.html)?$ /article.php;
rewrite ^/article(/|.html)?$ /article.php;
rewrite ^/pages/(.*).html$ /page.php?name=$1;
rewrite ^/tags/([^/]+)/$ /tag.php?t=$1&page=1;
rewrite ^/tags/([^/]+)/page-([0-9]+)(/)?$ /tag.php?t=$1&page=$2;
rewrite ^/embed/([^/]+)$ /embed.php?vid=$1;
rewrite ^/([^/]*)_([a-zA-Z0-9]{9}).html$ /watch.php?vid=$2;
rewrite ^/fpembed-(.*).swf$ /fpembed.php?vid=$1;
rewrite ^/uploads/thumbs/(.*)-social\.(jpg|gif|png)$ /social-thumb.php?vid=$1;
rewrite ^/rss.xml$ /rss.php last;
"
 #3314  by nguyenoanh
 22 Nov 2018 14:26
Bạn mở file vhost của doman /etc/nginx/conf.d/domain.com.conf nhé.
Trong đó có hướng dẫn đủ để bạn tự edit được. :)

Về Ubuntu hay centos thì như nhau thôi. Quan trọng là bạn chọn giữa Apache và Nginx
Hacobi1102 liked this
 #3339  by olalavui
 23 Nov 2018 09:44
Centos thì có giải pháp Centoswebpanel cũng ổn mà ...

Tại mỗi tội nó cũng ngốn ram (hơi hơi) nên mình k xài nữa - dù nâng cả lên pro để xài cũng là support thêm tính năng, còn nếu config ngon chắc phải dịch vụ :D
Tất nhiên nó k ngốn như kiểu a cpanel / DA default :v
nguyenoanh liked this
 #3405  by dungle79
 25 Nov 2018 22:02
nguyenoanh wrote:
22 Nov 2018 14:26
Bạn mở file vhost của doman /etc/nginx/conf.d/domain.com.conf nhé.
Trong đó có hướng dẫn đủ để bạn tự edit được. :)

Về Ubuntu hay centos thì như nhau thôi. Quan trọng là bạn chọn giữa Apache và Nginx
Admin chỉ giúp , nếu thế thì mình edit cái file đó thêm nội dung gì nữa thì mới bật được mod_rewrite lên ? MÌnh chỉ abc nên cài theo hướng dẫn thôi .
 #3409  by nguyenoanh
 26 Nov 2018 23:09
dungle79 wrote:
25 Nov 2018 22:02
nguyenoanh wrote:
22 Nov 2018 14:26
Bạn mở file vhost của doman /etc/nginx/conf.d/domain.com.conf nhé.
Trong đó có hướng dẫn đủ để bạn tự edit được. :)

Về Ubuntu hay centos thì như nhau thôi. Quan trọng là bạn chọn giữa Apache và Nginx
Admin chỉ giúp , nếu thế thì mình edit cái file đó thêm nội dung gì nữa thì mới bật được mod_rewrite lên ? MÌnh chỉ abc nên cài theo hướng dẫn thôi .
Mode bạn cần trên Nginx không có, nó chỉ có trên Apache thôi :(
Get 25 USD Free To USE VPSSIM