[solved] Remove Artist and videoID from Url
Board index / PHP Melody - Video CMS / PHP Melody 1.6.x (old version)
10 posts • Page 1 of 1
PHP Melody uses a SEO url format like this:
http://www.sitename.com/artist/music-title_videoID
im not using php melody for music videos, but for general videos, especialy animation and commercials related
I'm upgrading from a planaform were I I'm using simple Urls like
http://www.sitename.com/music-title
I already have several pages indexed in google, and I know I have to change the functions.php and .htaccess for this to work but I cant figure it out. Please help me.
http://www.sitename.com/artist/music-title_videoID
im not using php melody for music videos, but for general videos, especialy animation and commercials related
I'm upgrading from a planaform were I I'm using simple Urls like
http://www.sitename.com/music-title
I already have several pages indexed in google, and I know I have to change the functions.php and .htaccess for this to work but I cant figure it out. Please help me.
- osa
- Non-verified
- Posts: 21
- Joined: Oct 28, 2008 2 pm
- Reputation points: 0
VideoID is a must. If you remove this from your links, no video will be identified.
To change the format of your video links, open include/functions.php and find this:
Change it as you wish. Then, update your .htaccess with the new format.
To change the format of your video links, open include/functions.php and find this:
- Code: Select all
$return = _URL.'/'.$artist.'/'.$song.'-video_'.$id.'.html';
Change it as you wish. Then, update your .htaccess with the new format.
- Paul
- Developer
- Posts: 772
- Joined: Jul 14, 2007 9 am
- Reputation points: 38
wow, fast reply!
I found the functions.php line, but I keep getting a 404 error, when changing the .htaccess line. I know the line to change, but dont know what to remove.
I will keep the id
I found the functions.php line, but I keep getting a 404 error, when changing the .htaccess line. I know the line to change, but dont know what to remove.
I will keep the id
- osa
- Non-verified
- Posts: 21
- Joined: Oct 28, 2008 2 pm
- Reputation points: 0
This is the line you have to edit in htaccess:
The first "(.*)" is for 'Artist', the second is for 'Video Title' and third is for 'VideoID'.
Just edit the first part:
- Code: Select all
RewriteRule ^(.*)/(.*)-video_(.*).html$ musicvideo.php?vid=$3
The first "(.*)" is for 'Artist', the second is for 'Video Title' and third is for 'VideoID'.
Just edit the first part:
- Code: Select all
^(.*)/(.*)-video_(.*).html$
- Paul
- Developer
- Posts: 772
- Joined: Jul 14, 2007 9 am
- Reputation points: 38
Many thanks Paul. But its still not solved.
This is how I have it now to remove the artist from the URL:
functions.php :
.htaccess :
No error this time , but it keeps redirecting to the main page.
Not to abuse your patience.
This is how I have it now to remove the artist from the URL:
functions.php :
- Code: Select all
$return = _URL.'/'.$song.'-video_'.$id.'.html';
.htaccess :
- Code: Select all
RewriteRule ^(.*)-video_(.*).html$ musicvideo.php?vid=$3
No error this time , but it keeps redirecting to the main page.
Not to abuse your patience.
- osa
- Non-verified
- Posts: 21
- Joined: Oct 28, 2008 2 pm
- Reputation points: 0
The htaccess rule should look like this:
- Code: Select all
RewriteRule ^(.*)-video_(.*).html$ musicvideo.php?vid=$2
- Paul
- Developer
- Posts: 772
- Joined: Jul 14, 2007 9 am
- Reputation points: 38
Working just great. Thanks Paul for the amazing support.
- osa
- Non-verified
- Posts: 21
- Joined: Oct 28, 2008 2 pm
- Reputation points: 0
Google takes as a duplicate, so penalize you if you see that you can enter the URL that had the artist and no artist now. As you would do in the htaccess to avoid having to put one by one the url changed.
Thanks
Thanks
- kztixo
- Verified Customer
- Posts: 31
- Joined: Oct 23, 2008 6 pm
- Reputation points: 0
kztixo wrote:Google takes as a duplicate, so penalize you if you see that you can enter the URL that had the artist and no artist now. As you would do in the htaccess to avoid having to put one by one the url changed.
Thanks
not if you give google a canonical URL in your head section. Then it will use that always.
- mephisto
- Verified Customer
- Posts: 2888
- Joined: Sep 30, 2008 8 am
- Reputation points: -6
Up
How to do it on apollo
How to do it on apollo
- maniaka55
- Verified Customer
- Posts: 63
- Joined: Jun 10, 2013 11 am
- Reputation points: 10
10 posts • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 0 guests