如何重定向:
URI:http://www.example.com/blog
但/blog
不在根域子目录中但在另一个目录中
因此,当人们键入www.example.com/blog
时,它会加载其他目录而不是根域的子目录。
答案 0 :(得分:0)
最好由Alias
指令
#include <stdio.h>
#include<stdlib.h>
char push();
char pop();
char display();
char peek();
char reverse();
# define MAX 50
struct stack
{
char string[MAX];
int top= -1;
};
void main()
{
int a;
printf("Choose an option\n");
printf("1.Insert\n");
printf("2.Delete\n");
printf("3.Display\n");
printf("4.Peek\n");
printf("5.Reverse\n");
scanf("%d", &a);
switch(a)
{
{
case 1: push();
break;
}
{
case 2: pop();
break;
}
{
case 3: display();
break;
}
{
case 4: peek();
break;
}
{
case 5: reverse();
break;
}
default : printf("Invalid Input");
}
}
char push(char a)
(
char a;
printf("Enter the string");
scanf("%c",&a);
if(top=MAX-1)
{
printf("Stack Overflow");
}
else
(
top=top+1;
string[top]=a;
)
)
char pop()
(
char c;
(
if(top=-1)
{
printf("Stack Underflow");
}
else(
c=string[top];
top=top-1;
printf("The character removed is %c", c);
)
)
)
char display()
{
int i;
for(i=0,i<=MAX-1,i++)
{
printf("%c", string[i]);
}
}
char peek()
(
printf("The top element is %c", string[top]);
)
char reverse()
(
int i;
printf("The reverse of string is");
for(i=MAX-1,i>=0,i--)
(
printf("%c",string[i])
)
)
不幸的是,这在.htaccess文件中不起作用,仅在主配置中。如果您无法访问主配置文件并需要在.htaccess中执行此操作,则可以使用RewriteRule
prog.c:12:16: error: expected ':', ',', ';', '}' or '__attribute__' before '=' token
int top= -1;
^
prog.c:14:6: warning: return type of 'main' is not 'int' [-Wmain]
void main()
^
prog.c:54:9: error: expected declaration specifiers or '...' before 'printf'
printf("Enter the string");
^
prog.c:55:9: error: expected declaration specifiers or '...' before 'scanf'
scanf("%c",&a);
^
prog.c:56:9: error: expected declaration specifiers or '...' before 'if'
if(top=MAX-1)
^
prog.c:73:13: error: expected identifier or '(' before 'if'
if(top=-1)
^
prog.c:98:6: error: expected declaration specifiers or '...' before 'printf'
printf("The top element is %c", string[top]);
^
prog.c:96:6: error: 'peek' declared as function returning a function
char peek()
^
prog.c:96:6: error: conflicting types for 'peek'
prog.c:6:6: note: previous declaration of 'peek' was here
char peek();
^
prog.c: In function 'peek':
prog.c:105:6: error: expected declaration specifiers or '...' before 'printf'
printf("The reverse of string is");
^
prog.c:106:6: error: expected declaration specifiers or '...' before 'for'
for(i=MAX-1,i>=0,i--)
^
prog.c:112:6: error: expected '{' at end of input
)
^
prog.c:112:6: warning: control reaches end of non-void function [-Wreturn-type]
)
^