Search the Community
Showing results for tags 'subdomain'.
-
I'm looking for directives that help solving the problem of redirecting a not existing subdomain towards the www subdomain. I know/guess .htaccess is used, but cant figure out how. My present situation is that existing subdomains are redirected well. I adjusted virtual hosts in this way: <VirtualHost *:80> ServerName mysite.dev ServerAlias mysite.dev *.mysite.dev DocumentRoot X:/wamp/www/TestVirtHost/ <Directory "X:/wamp/www/TestVirtHost/"> Options +Indexes +FollowSymLinks +MultiViews AllowOverride All Require local </Directory> <
-
I have a thing I dont get. I found this regex part to check for correct subdomains. function check_subdomain($data){ if (!empty($data)){ $data = preg_match("/^(?:[A-Za-z0-9][A-Za-z0-9\-]{0,61}[A-Za-z0-9]|[A-Za-z0-9])$/", $data); return($data); } else { } } echo check_subdomain($data); but the strange thing is that echo check_subdomain($data) outputs the input and adds a 0 when wrong and a 1 when correct. why is this done and how to avoid it?
-
Hello, At my website, I am trying to design a record of the articles I read similar to Richard Stallman's Political Notes or, Dave Winer's more complicated linkblog. Browsing Stallman's html, I understand that each note has an anchor that organizes it by date. Then, I'm not totally sure how, the notes are sort of cross posted to date-specific pages available from the links at the top of the page. In Stallman's markup, there's a comment indicating a line needed for scripts, which leads me to believe that Stallman uses some kind of script to quickly organize each note into the date-specific page