No trailing slash on URLs , no Redirects!
Posted: 12. July 2021 21:07
I am looking to reproduce the behavior I got with the PHP development server which allowed me to load for example
and get
I need to do this without redirects.
The only way I have found to do this so far is with .htaccess. All other solutions seem to produce a redirect!
My .htaccess is now is as follows:
this works fine except the last two commented lines. You see I have some directories that are generated randomly with UUIDS
they look like this:
I need to access this like this
and get the index.php contained in the directory named by UUID . THESE ARE RANDOM UUIDS! I need a wildcard solution.
I also have:
Which here again I want to get the index.php there the "NextDocument" folder. The "NextDocument" is a fixed name but the UUID wildcard remains.
Any help on this?
- Code: Select all
http://myserver/directory
and get
- Code: Select all
http://myserver/directory/index.php
I need to do this without redirects.
The only way I have found to do this so far is with .htaccess. All other solutions seem to produce a redirect!
My .htaccess is now is as follows:
- Code: Select all
DirectorySlash Off
RewriteEngine On
RewriteRule ^eSCL/ScannerStatus/?$ eSCL/ScannerStatus/index.php [L]
RewriteRule ^eSCL/ScannerCapabilities/?$ eSCL/ScannerCapabilities/index.php [L]
RewriteRule ^eSCL/ScanJobs/?$ eSCL/ScanJobs/index.php [L]
RewriteRule ^eSCL/Scans/?$ eSCL/Scans/index.php [L]
RewriteRule ^eSCL/Scans/NextDocument/?$ eSCL/Scans/NextDocument/index.php [L]
# RewriteRule ^eSCL/ScanJobs/.*/?$ eSCL/ScanJobs/.*/index.php [L]
# RewriteRule ^eSCL/ScanJobs/.*/.*/?$ eSCL/ScanJobs/.*/.*/index.php [L]
this works fine except the last two commented lines. You see I have some directories that are generated randomly with UUIDS
they look like this:
- Code: Select all
/eSCL/ScanJobs/267d04d6-70dc-4693-8d96-063391ec4066
I need to access this like this
- Code: Select all
/eSCL/ScanJobs/267d04d6-70dc-4693-8d96-063391ec4066
and get the index.php contained in the directory named by UUID . THESE ARE RANDOM UUIDS! I need a wildcard solution.
I also have:
- Code: Select all
/eSCL/ScanJobs/267d04d6-70dc-4693-8d96-063391ec4066/NextDocument
Which here again I want to get the index.php there the "NextDocument" folder. The "NextDocument" is a fixed name but the UUID wildcard remains.
Any help on this?