Current time: 08-05-2020, 01:14 AM Hello There, Guest! (LoginRegister)

Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
installing below doc root
07-30-2012, 07:46 PM (This post was last modified: 07-30-2012 07:46 PM by braincracking.)
Post: #3
RE: installing below doc root
Hi

I also wanted to install WPT in a sub-directory and spent many hours to modify the source code. It mostly works for the pages I'm used to see, but I think a 2nd view could find 404

Features :
- the sub-directory is configured via settings.ini
- default to empty string
- should not conflict with $GLOBALS['cdnPath']
- probably 90% of all the urls are now prefixed with $GLOBALS['basePath']

Missing / Dangers :
- tested only the pages I need to see, but that should cover most of the
- Works For Me© : tested on 2 different servers for now, but never tested anywhere else
- CSS are not dynamic so the sub-directory is hardcoded. I did not took the time to re-generate them via PHP, but that's what should be done
- tried to have all rewrite rules to be relative instead of absolute
eg: RewriteRule ^result/([a-zA-Z0-9_]+)$ ./result/$1/ [R]
It mostly worked but at the end I finally had to turn off HTTP_MOD_REWRITE to have all work fine
- should probably better use a makeURL() function rather than just prefixing strings

So, the time-consuming code is made, but lacks more testings on other environments
Do you want to try to merge this version with the HEAD ? How do you want me to provide the code ?

Jean-pierre VINCENT
braincracking.org
Fork of WPT monitor private instance : https://github.com/jpvincent/WPT-server
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
installing below doc root - bhopps - 05-18-2012, 05:52 AM
RE: installing below doc root - pmeenan - 05-19-2012, 01:08 AM
RE: installing below doc root - braincracking - 07-30-2012 07:46 PM
RE: installing below doc root - pmeenan - 08-01-2012, 04:43 AM
RE: installing below doc root - pmeenan - 08-03-2012, 12:57 AM
RE: installing below doc root - jlong - 12-19-2012, 05:42 AM
RE: installing below doc root - pmeenan - 12-19-2012, 06:48 AM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)