所以我正在运行Ubuntu 16.04 VPS&我正在托管我的网站。我想知道如何在我的网站上阻止URL&webmail /或/ phpmyadmin /?我正在使用apache2&我真的不知道如何做到这一点。我试着到处寻找,但无法找到可行的解决方案。
我想要做的是阻止或重定向网址。两种选择都没问题。
答案 0 :(得分:0)
刚刚找到解决方案!我去了我的apache2.conf,然后在配置中添加了RedirectMatch。
例如我用过这个:
bool paint = false;
SolidBrush color;
private MessageBoxButtons buttonType;
public Form1()
{
InitializeComponent();
}
private void picture_Click(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, System.EventArgs e)
{
this.Opacity = 0;
time.Enabled = true;
}
private void button3_Click_1(object sender, System.EventArgs e)
{
SaveFileDialog savefiledialog1 = new SaveFileDialog();
try
{
savefiledialog1.Title = "Save File";
savefiledialog1.FileName = "Capture Screen";
savefiledialog1.Filter = "JPEG |*.jpeg";
if (savefiledialog1.ShowDialog() == DialogResult.OK)
picture.Image.Save(savefiledialog1.FileName, System.Drawing.Imaging.ImageFormat.Bmp);
Application.Exit();
}
catch (Exception ex)
{
}
}
private void time_Tick_1(object sender, System.EventArgs e)
{
Rectangle bounds = default(Rectangle);
System.Drawing.Bitmap screenshot = default(System.Drawing.Bitmap);
Graphics graph = default(Graphics);
bounds = Screen.PrimaryScreen.Bounds;
screenshot = new System.Drawing.Bitmap(bounds.Width, bounds.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
graph = Graphics.FromImage(screenshot);
graph.CopyFromScreen(bounds.X, bounds.Y, 0, 0, bounds.Size, CopyPixelOperation.SourceCopy);
picture.Image = screenshot;
time.Enabled = false;
this.Opacity = 100;
}
private void picture_MouseUp(object sender, MouseEventArgs e)
{
paint = false;
}
private void picture_MouseDown(object sender, MouseEventArgs e)
{
paint = true;
}
private void picture_MouseMove(object sender, MouseEventArgs e)
{
if (paint)
{
Graphics g = picture.CreateGraphics();
color = new SolidBrush(Color.Blue);
g.FillEllipse(color, e.X, e.Y, 5, 5);
}
}
}
将我的网址重定向到我想要的地方!