1
lotanas
probleme with url rewriting -%20 "mytube"
  • 2010/4/16 19:40

  • lotanas

  • Just popping in

  • Posts: 10

  • Since: 2009/6/20


hello

I have a site "xoops" I use MyTube: http://code.google.com/p/mcdonaldsstore/downloads/list
for the videos,

but I have a problem with spaces in the links from my site in url rewriting

this is what I did:

modules/mytube/.htacces


Options + FollowSymLinks
RewriteEngine on

RewriteRule ^ watch-(.+)-([ ]+)-([ 0-9 0-9] +). $ Html / modules / MyTube / singlevideo.php? Cid = $ 2 & lid = $ 3 [L]


The result: http://xxx.com/regarder-titre-de-la-video-15-565.html

to have links with the title of the video I changed the links page (. html) template of modules
eg in lxoopstube_block_new_h
I put

<($ Xoops_url)> / modules / <($ videoload.dirname)> / watch-<($ videoload.title }>-<{$ videoload.cid }>-<{$ videoload.id)>. Html


<($) Videoload.title> is under the video

my problem is that most videos continnent spaces in the title eg title of video

This gives the following url
http://xxx.com/regarder-titre% 20de% 20la% 20vidéo-15-565.html and accented letters are displayed as they are,

I want to know Quesques I do to prevent 20% of my links and how to replace accented letters with non-accented equivalents


tnx & sorry for my bad english

2
red_Slider
Re: probleme with url rewriting -%20 "mytube"

After:
RewriteRule ^ watch-(.+)-([ ]+)-([ 0-9 0-9] +). $ Html / modules / MyTube / singlevideo.php? Cid = $ 2 & lid = $ 3 [L]


add that:
RewriteRule ^/([^/]+)/([^-]+)-(.*)\.html$ /$1/$2\ $3.html [N]
RewriteRule ^/([^/]+)/([^.]+)\.html$

or that:
RewriteRule ^.*$ %1-%2 [E=space_replacer:%1-%2]
RewriteCond %{ENV:space_replacer}!^$
RewriteCond %{ENV:space_replacer}!^.*\ .*$
RewriteRule ^.*$ %{ENV:space_replacer} [R=301,L]

3
lotanas
Re: probleme with url rewriting -%20 "mytube"
  • 2010/4/19 11:40

  • lotanas

  • Just popping in

  • Posts: 10

  • Since: 2009/6/20


no succes :s

4
lotanas
Re: probleme with url rewriting -%20 "mytube"
  • 2010/4/21 12:36

  • lotanas

  • Just popping in

  • Posts: 10

  • Since: 2009/6/20


upupupupupup

Login

Who's Online

85 user(s) are online (59 user(s) are browsing Support Forums)


Members: 0


Guests: 85


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits