September 01, 2012 01:46PM
Hi,

Thank you for your reply. Sorry for the late response but the forum didn't notify me of your post.

I tried your suggestion.

rewrite ^/(.*?)/.*$ /entry/index.php?id=$1 permanent;

It works for http://www.domain.com/1234/pretty-url-goes-here but it does not work for http://www.domain.com/1234.

Also, it does not leave the url as entered. So, for example, if you input http://www.domain.com/1234/pretty-url-goes-here it changes the address bar to http://www.domain.com/entry/id=1234 instead of staying at the pretty url.

Any thoughts?

Thanks,

slevytam
Subject Author Posted

Rewrite a Shortened URL to a Pretty URL?

slevytam August 22, 2012 02:23AM

Re: Rewrite a Shortened URL to a Pretty URL?

Edho Arief August 22, 2012 02:32AM

Re: Rewrite a Shortened URL to a Pretty URL?

Javi Lavandeira August 22, 2012 05:08AM

Re: Rewrite a Shortened URL to a Pretty URL?

slevytam September 01, 2012 01:46PM

Re: Rewrite a Shortened URL to a Pretty URL?

Edho Arief September 01, 2012 01:54PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready