Mobile app version of vmapp.org
Login or Join
Gretchen104

: Create unique IDs between URL with nginx I searched and tried nearly two weeks but don't get any useful result, so I'm trying my luck here before I get crazy: Every existing domain should

@Gretchen104

Posted in: #ModRewrite #Mysql #Nginx #UrlRewriting

I searched and tried nearly two weeks but don't get any useful result, so I'm trying my luck here before I get crazy:

Every existing domain should get an unique ID right after the domain. The ID should be 8 digits and contains a random value a-z,A-Z,0-9 which changes automatically every 24 hours.

For example:
domain.com/subdomain/page.html <-- Original URL domain.com/W7zjcTP5/subdomain/page.html <-- Changed URL domain.com/jfP7x9sZ/subdomain/page.html <-- 1 day later domain.com/eh7PjCzG/subdomain/page.html <-- 2 days later domain.com/JF8scd4d/subdomain/page.html <-- 3 days later


But when someone saved the link 5 days ago, this link should still be usable and accessable, so thereforce there must be saved the actual active ID and all used IDs for each URL somewhere, to redirecting to original URL.
Also when one ID was used before, it must not used never again. When using a generated ID there also have to be a check if this ID was created before.

I really get stuck and don't know how to solve this problem, thank you for your help!

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Gretchen104

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme