0

it is possible to change the url rewrite in a cake app ?

Actually it's like this :

http://myapp.fr/myapp/admin/users/view/30

I want to hide everything after the ".fr" in every page, like this :

http://myapp.fr/

Thank you for your help.

hidewak
  • 299
  • 1
  • 4
  • 16

3 Answers3

0

Try this one

add this code in footer.

$( document ).ready(function() {
    window.history.replaceState("Home page ", "Title", "<?php echo SITEURL;?>"); });
Yogesh Saroya
  • 1,401
  • 5
  • 23
  • 52
0
// you can use both 
<script type="text/javascript">
$( document ).ready(function() {
   /* window.history.replaceState("Home page : Dostoom", "Title", "http://192.168.1.59/dostoom/");*/
    window.history.pushState("Home page : EDUCATION", "Title", "SITEURL");
})
</script>
0

Create a Single Page Application.

Have the landing page request everything through ajax or other such means, placing the data in the DOM without refreshing.

This way the URL will always be the same but you're also loosing benefits like the ability to go forth/back in history. You may or may not need those but for some people this will be confusing.

Doing it with rewrite wouldn't ever work the way I believe you want it happening.

user221931
  • 1,852
  • 1
  • 13
  • 16
  • My app is already finished and I don't have time to make big modifications, but I'm okay with you this is a way to do it but you need to plane it at the conception step – hidewak Jul 04 '14 at 06:58