Add new comment

Want to support HowtoForge? Become a subscriber!
Submitted by Sannny (registered user) on Wed, 2008-08-06 13:50.

If the url contains port numbers like "http://howtoforge.com:80/index.html", lighttpd will lookup the database with the port number. To ignore this, use

"SELECT docroot FROM domains WHERE domain= SUBSTRING_INDEX('?', ':', 1);"

as sql statement.

You also can add a new column into the database table with the port number to separate the docroots for different ports. 

"SELECT docroot FROM domains WHERE domain = SUBSTRING_INDEX('?', ':', 1) AND port = SUBSTRING_INDEX('?', ':', -1);"

Greets, Sannny

Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.

Reply

*
*
The content of this field is kept private and will not be shown publicly.


*

  • Images can be added to this post.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <div>
  • Lines and paragraphs break automatically.