desibaba Posted February 28 Share Posted February 28 How can II change the default URL pattern? from video/%ID%/%DIR%/ to something like xxxx/%DIR%/ I tried to change it in settings->website settings-> generated URL patterns. But its showing 404 error for both old and new videos. Quote Link to comment Share on other sites More sharing options...
Tech Support Posted February 28 Share Posted February 28 You also need to change RewriteRule in .htaccess file. You need to find the rewrite rules that are used for /video pages, e.g. these: RewriteRule ^video/([0-9]+)/([^/]+)/$ view_video.php?id=$1&dir=$2 [L,QSA] RewriteRule ^video/([^/]+)/$ view_video.php?dir=$1 [L,QSA] The first rule is for the case when you pass video ID AND video directory. The 2nd rule is for the case when you pass video directory only. So you need to change video part in them to your xxx part. Quote Link to comment Share on other sites More sharing options...
desibaba Posted February 28 Author Share Posted February 28 11 minutes ago, Tech Support said: You also need to change RewriteRule in .htaccess file. You need to find the rewrite rules that are used for /video pages, e.g. these: RewriteRule ^video/([0-9]+)/([^/]+)/$ view_video.php?id=$1&dir=$2 [L,QSA] RewriteRule ^video/([^/]+)/$ view_video.php?dir=$1 [L,QSA] The first rule is for the case when you pass video ID AND video directory. The 2nd rule is for the case when you pass video directory only. So you need to change video part in them to your xxx part. like these? RewriteRule ^xxx/([0-9]+)/([^/]+)/$ view_xxx.php?id=$1&dir=$2 [L,QSA] RewriteRule ^xxx/([^/]+)/$ view_xxx.php?dir=$1 [L,QSA] Quote Link to comment Share on other sites More sharing options...
Tech Support Posted February 28 Share Posted February 28 No, you don't need to change view_video.php part, you only need to change the first part right after RewriteRule. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.