PHP Word上的短网址
16lz
2021-01-22
Does anyone know how to have a kind of URL Shortner?
有谁知道如何有一种URL Shortner?
for example, using PHP rather than having www.domain.com/page.php?seq=1435 to have www.domain.com/rGhpf
例如,使用PHP而不是www.domain.com/page.php?seq=1435拥有www.domain.com/rGhpf
Does anyone have any ideas on what i can do with this - any help would be much appreciated
有没有人对我能做些什么有任何想法 - 任何帮助将不胜感激
2 个解决方案
#1
1
You can do this using Apache's Rewrite urls.
你可以使用Apache的Rewrite urls来做到这一点。
RewriteEngine On
RewriteRule ^seq/([0-9/]+)$ /page.php?seq=$1 [L]
That means you can goto http://domain.com/seq/1435 instead of http://www.domain.com/page.php?seq=1435
这意味着您可以转到http://domain.com/seq/1435而不是http://www.domain.com/page.php?seq=1435