The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hiding php extension
#3
I will say that this is the closest I can get quickly to it working...
RewriteEngine on

#unless directory, remove trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /4408/$1 [R=301,L]

#redirect external .php requests to extensionless url
RewriteCond %{THE_REQUEST} ^(.*)\.php([#?][^\ ]*)?\ HTTP/
RewriteRule ^(.*)\.php$ /4408/$1 [R=301,L]

#resolve .php file for extensionless php urls
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ /4408/$1.php [L]

But from there you would need to figure out how to make php functions actually work. If you find out, let me know!
Btw, the 4408 is the folder that my project was in.

Normally you can move userspice from folder to folder without breaking anything and this would take that feature away.
  Reply


Messages In This Thread
Hiding php extension - by MerajBD - 04-19-2019, 06:48 AM
RE: Hiding php extension - by mudmin - 04-19-2019, 11:50 AM
RE: Hiding php extension - by mudmin - 04-19-2019, 12:02 PM
RE: Hiding php extension - by MerajBD - 04-19-2019, 01:58 PM
RE: Hiding php extension - by mudmin - 04-19-2019, 02:07 PM
RE: Hiding php extension - by MerajBD - 04-19-2019, 03:16 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)