I have installed yourls in my domain under a subdirectory. This service works in place where there is a working URL There is 1 subdirectory.
Is there a way to create a rule in calling to solve working URL?
I do not quite understand where to place it and how to set rules, because I am not sending parameters.
Thanks
Always counting as subdirectory, and subdirectory one In the physical directory, make a file .htaccess
in your www-root and add the following to it:
Rewrite / rewrite on rewriting engine %% {REQUEST_URI} ^ / [[0- 9] +) [^ /] * $ rewrite %% {DOCUMENT_ROOT} /% 1-D recruitment rule ^ ([0- 9] +) ([^ /] *) $ / $ 1 / $ 2 [L]
This first checks to match the URL ^ ( [0-9] +) ([^ /] *) $
(starts with 1 or more numbers, and contains any non-slash characters. Revoked% {REQUEST_URI} ^ / ([0- 9] +) [^ /] * $
matches the same thing, because we need the directory in the next condition. ReworkCorock% {DOCUMENT_ROOT} / % 1 -d
checks that if we think the number is a subdirectory, then there is actually a directory. If this is the case, then the URL is internally
Comments
Post a Comment