Programming :: Apache Rewrite Rules - How To Make "not Some String" Rule
Jan 26, 2011
I am trying to create apache rule which will redirect each request not ending with .php prefix to php prefix. I am trying to make such a rule for hours, but none of my works.
Example: I don't know syntax of rewrite rules, but I'd like to make something like this:
RewriteRule ^(.*)(NOT .php) $1.php
(so everything not ending with .php will end in everything with .php extension.
EDIT: Maybe better question would be "how to negate string group" or "is not equal to string"...
View 4 Replies
ADVERTISEMENT
Jul 16, 2010
I've been playing around with rewrite rules and I cannot get it to work for what I'm trying to do.I want it so that when someone goes to http://www.mydomain.com/HWM/ it redirects it to /cgi-bin/HWM/somefile.cgiHere's the config for my virtual host:
Code:
NameVirtualHost *
<VirtualHost *>
[code]....
View 2 Replies
View Related
Sep 15, 2010
I want to gave much details as possible. working directory (~/a1/shell) in the shell directory i have Makefile. also in the shell directory i have subdirectory's (obj, src, include)
My current Makefile
Quote:
#What needs to be built to make all files and dependencies
clean:
# End of Makefile
I wanted it so: all .o files are created in the obj subdirectory, and my application, sshell, is created in the shell directory.
I am getting this error when i run the make run: No rule to make target 'shell.h', needed by 'shutil.o'. stop
View 1 Replies
View Related
Jan 18, 2010
I want to rewrite one url using apache mod_rewrite,
myurl is [URL]
and want to rewrite like this. [URL]
View 2 Replies
View Related
Feb 2, 2011
My make file has the following lines:
blah blah
INCLUDES= -I./src
-I./include
-I$(PROJECTPATH)/myproject/libs/liburi/include
LDFLAGS+= -L$(PROJECTPATH)/myproject/libs/liburl/
[code]....
The LDFLAGS specifies the library path, which is specified as -L$(PROJECTPATH)/myproject/libs/liburl/ When I check this directory on my machine I see that the file: liburi.so.1 is indeed there.
View 1 Replies
View Related
Sep 14, 2010
I'm trying to set up my web server (nginx) as a catchall virtual host, as per an example that can be seen here: [URL].. (It's the Wildcard Subdomains in a Parent Folder example). Now, here's my issue. I use Wordpress on the coburndomain.org domain. I have pretty URLs enabled, that make my Wordpress articles look like this:[URL].. At the moment, nginx is reporting 500 Errors, saying that index.php is not a directory. What I want to do is make a rewrite rule that allows me to use the above URL example with nginx.
I followed this tutorial to do so: [URl].. , but I'm not sure how to apply it to my setup. Here's my configuration files from Debian Squeeze with Nginx onboard:
[Code]...
View 1 Replies
View Related
Feb 14, 2010
I'm using build root to make an embedded rootfs and compile some code. However I get the following error
make: *** No rule to make target `linux26', needed by `linux-fusion'. Stop.
View 7 Replies
View Related
Mar 30, 2010
Code:
anisha@linux-p0mg:~> uname -r && cat /etc/*release
2.6.25.5-1.1-pae
openSUSE 11.0 (i586)
VERSION = 11.0
My small Makefile:
Code:
obj-m += serialPortISR.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
Errors I receive:
Code:
anisha@linux-p0mg:~/Desktop/serialPortISR_31_10_09> make
make -C /lib/modules/2.6.25.5-1.1-pae/build M=/home/anisha/Desktop/serialPortISR_31_10_09 modules
make[1]: Entering directory '/usr/src/linux-2.6.25.5-1.1-obj/i386/pae'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory '/usr/src/linux-2.6.25.5-1.1-obj/i386/pae'
make: *** [all] Error 2
View 12 Replies
View Related
Jan 19, 2010
I want to redirect [url] to [url] how to do this? The only solution that came up is just redirect everything to a php file, and than ask the php file do the redirect..... I want to do it using .htaccess file instead of using PHP or CGI.
View 4 Replies
View Related
Oct 22, 2010
copy string a to string b and change string b with toupper() and count the chars
View 3 Replies
View Related
Feb 10, 2010
I have done a2enmod rewriteand rewrite.load appears in the mods-enabled subdirectory.
My httpd.conf file contains DocumentRoot "/usr/appl/prod/htdocs/" <Directory />Options FollowSymLinks
AllowOverride All
Order deny, allow
[code].....
View 8 Replies
View Related
Oct 7, 2010
I am getting an error as below.
How do I resolve the error: make[2]: *** No rule to make target `', needed by `mpg123'.
How can I resolve this error.
View 4 Replies
View Related
Feb 26, 2010
i am trying to get this rewrite using a text file to work but it seems not to pick up the text or read it the way i want. here is what is happening i want to merge 2 domains .com and .net into one vhost file and one website. but the .net has alot of redirects which i want to put in a txt file bacuse there are over 200 line of redirects static.also exclude the robots.txt file. and i want the rule to look for any string be it after the first slash of with the url like so
[URL]
should use the map text file and rewrite.
txt file example
wsd/html/aboutus.html /aboutus
wsd/html/aboutus.htm /aboutus
wsd/html/aboutus.php /aboutus
[Code]....
View 1 Replies
View Related
May 27, 2010
redirect a domain name with /abc to external ip of web server. Now I can made sure that I should use the rewrite module to achieve this issues. But I don't know how can I enable this function in my apache web server. I will post my httpd.conf for your reference.
View 14 Replies
View Related
Feb 22, 2010
I have a base install of a LAMP server on my system, and I'm trying to get mod_rewrite working on that local server (the directory of the local site is [URL]. I added this to my /etc/apache2/httpd.conf file, which was blank before I did so:
Code:
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
[code]....
It's supposed to redirect everything except the listed directories to index.php, which is used as a front controller. However, if I type in [URL] <any other page> I get a 404 error.
View 2 Replies
View Related
Jun 4, 2011
I have a website example.com, serving pages on port 80. I want the url example.com/redmine to be rewritten to port 3000, where my redmine server is running, without actually changing the URL. So the user typing in example.com/redmine/test would serve up example.com:3000/test, without the user actually connecting through the port. I know this can work through CPanel, but I don't know exactly how it was implemented. I'm looked at how mod_proxy, mod_proxy_html, and mod_rewrite,
View 4 Replies
View Related
Jan 24, 2009
I am following the instructions on Section 8.1.* Device Driver ConceptsHere I was able to proceed till section 8.1.4.After making the hello.c file,the make file and patching the Kconfig as mentioned,I tried to run the $ make ARCH=ARM CROSS_COMPILE=xscale_be- gconfig This gave error as:make: *** No rule to make target `gconfig'. Stop.I am not sure if my kernel is correctly compliled,but I was able to complie and build the kernel for arm before by cloning the kernel and building from the following link without any error. https://omapzoom.org/gf/project/omap...ux+OMAP+Kernel
View 2 Replies
View Related
Feb 25, 2011
I have down loaded: slapt-get-0.10.2h-i386-1.tgz I have read the install directions:
Quote:
- Using pkgtools: ----------------
To install:
$ make pkg
$ installpkg ./pkg/slapt-get-${VERSION}-${ARCH}-${RELEASE}.tgz
When I try make pkg, I get:
Code:
root@darkstar:/home/rob# make pkg
make: *** No rule to make target `pkg'. Stop.
I guess that I do not understand the instructions?
View 5 Replies
View Related
Jul 16, 2009
I'm trying to make a redirect rule on my .htaccess but it's not working as planned.
Quote:
The first rule works fine, but on the second rule i do have a problem.
When I type http://domain.com/?tempskin=_rss2 the redirect does not work, but if I change the ? to any other character or even group of characters, the redirect works fine. example:
[url] will be redirected to [url]
But i do need to redirect the ?tempskin=_rss2. I already tried some variations on the redirect rule without any success.
View 1 Replies
View Related
May 3, 2011
I've been trying to understand pthread in C a little better. So I made a simple program that takes in a string from the command line and creates a thread to print the string. I've looked online and copied the basic concepts but there are something things I'm confused about. The programs works just fine, but I have questions. Here's what I have so far.
[Code]....
One thing I'd like to know is why the 3rd argument in the pthread_create function which is my SendMessage function needs to be typecasted to a void pointer and then send the address of the function. Also as for the 4th argument, I would see typecasting to void pointer in some of the pthread examples I saw online, but in my case I'm passing a char pointer, would this be correct? In which case would I ever want to pass a void pointer?
Do I need a pthread_exit(NULL) in my main and in the SendMessage function? If so, why? I added the sleep() function so that I could let the pthread_exit function in my SendMessage function execute first. I simply saw that the online examples on pthread had pthread_exit() in both locations.
View 6 Replies
View Related
Apr 7, 2010
my script has a variable which comes in the form +00.00 +0.00 -00.00 or -0.00 (the numbers can be any in that form) for any that have a + symbol I need to remove the +, but if it has a - symbol it needs to stay.
i need to make a new variable with the string from the old variable btut without any plus sign. I have tried a lot of different ways with no success, each thing I tried either left the + or removed the entire string. I think this should work but doesn't
foo=+12.40
bar=${foo#+}
View 4 Replies
View Related
Oct 16, 2010
I have a set of lines as ahown below:
Leon went to school
Leon came back from school..
Leon had dinner...
I have to replace the line containing "dinner" by a single string LUNCH...
View 2 Replies
View Related
Feb 25, 2011
I need to creates string suffixes out of a Reference string. for eg. suffixes of abcdefg will be
1)bcdefg
2)cdefg
3)defg
and so on...
create an array of pointers to point to the first few characters and then use that pointer to print the rest of the string.But when i print using the pointer i get GARBAGE values! shudn't std::cout<<ptr[w] print the string following the char it is pointing to? why do i get garbage values?
View 9 Replies
View Related
Apr 18, 2010
So if I'm given a location of a file like:
How can I just take the type of the file at the end? I know I can use strrchr() for a period to get the pointer to the period just before file type. Is there a build in string function that will just take the rest of the string from a certain point on forward in the string? I know it wouldn't be much work to make it myself, but I figured I would find out if it already existed before doing it.
View 9 Replies
View Related
Mar 13, 2010
Code:
The error is:
Code:
What I want to do is take input of ip4 as a string, convert it to an integer to add 1 to it, then reconvert it back to a string. Its not working.
My full code is:
Code:
View 1 Replies
View Related
Jan 28, 2010
I'm trying to enable the rewrite module in apache, to enabled the module I followed the last entry in the fist page this thread:[URL]...When I restart the apache all works fine, so I supose it's enabled
Now I create .htaccess in my apache folder (/home/user/apache), and I write this:
Code:
RewriteEngine On
RewriteRule ^link([^/]*).html$ test.php?link=$1 [L]
And I try to execute this: ./.htaccess, I have this mistakes:
Code:
./.htaccess: 1: RewriteEngine: not found
./.htaccess: 2: Syntax error: "(" unexpected
What are I doing wrong?
View 1 Replies
View Related
Oct 12, 2009
I've been given a custom-made string class which handles string, wstring and bstr. It has a number of methods and assignment operators to convert to and from different types. The app I work on compiles happily in VS6 and VS2008, but when trying to compile in Redhat (version 4.1.1 in Redhat 5.0)
[code]....
View 4 Replies
View Related
Nov 11, 2010
I have the following two type of strings1: A/D2: A/C/DI am trying to write a subroutine to check whether all of the letters in string 1 appears in string 2. If yes, return true. If not, return false. In the above example, all the letters (A and D) in string 1 are also present in string 2, so I return true.
View 4 Replies
View Related
Dec 24, 2010
After reading all the forum entries and tutorials I could find, which all make it sound very easy to do, however I type the command 'make' in the folder where I have the "rtl8192su_linux_2.4_2.6.0003.1019.2009.tar.gz " unzipped and get the following output:
make[1]: Entering directory `/lib/modules/2.6.35.6-45.fc14.i686/build'
make[1]: *** No rule to make target `modules'. Stop.
make[1]: Leaving directory `/lib/modules/2.6.35.6-45.fc14.i686/build'
[code]....
View 10 Replies
View Related
Aug 2, 2011
I am getting this following error when I do compilation..Please let me know what is missing
ubuntu@ubuntu-desktop:/home/swamy/ttviewer/uvcvideo-2.6.32$ make
make -C /lib/modules/2.6.31-203-gee1fdae/build SUBDIRS=/home/swamy/ttviewer/uvcvideo-2.6.32 modules
make[1]: Entering directory `/usr/src/linux'
[code]....
View 1 Replies
View Related