Server :: Rewrite To Redirect All To A Php File?
Dec 13, 2010
I have simple blog I created myself. I am using mod rewrite to redirect all to a php file. But I have links in google like [URL]
How can I match it with regular expression? I try with variants of ^([^/?]+)/$ but with no success.
The desired result is to redirect such addresses to [URL] or to 301 page
View 7 Replies
ADVERTISEMENT
May 20, 2010
how could i rewrite and redirect
Quote:
[URL]
to
Quote:
[URL]
domain from forum. to club. (red color part) url rewrite, blue color part is variable
View 3 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
Feb 2, 2011
I need to redirect through a .htaccess file in my root folder. The redirect needs to be done from http://www.department.univeristy.edu/reuir to a different server [url]. I am having trouble in determining the pattern that is required for it to take effect.
View 2 Replies
View Related
Mar 9, 2011
I am trying to grep multiple numbers from file, grep does have the -f option for that.
Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with
Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?
View 2 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
Sep 3, 2010
I have a question during a new kernel compilation (I made a backup of my .config) file) However I ran into issues during the make oldconfig process and unfortunately I issued a make clean followed by a mrproper which cleared my existing .config file.
Since I have a backup of my previous .config file is there of restoring without changing the permission rights to file?
-r--r--r-- 1 root root 27754 2010-09-03 22:39 /proc/config.gz
View 4 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
May 28, 2011
got a small setup in /home/username/public_html/.htaccess.
Code:
Action php-fcgi /~robert/fcgi-bin/php-fcgi-wrapper
the php-fcgi-wrapper is in /home/username/public_html/fcgi-bin/php-fcgi-wrapper or in the
[code]....
View 4 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
Nov 9, 2010
We have a apache server which have a ssl certificate like www.abc.com. We hosting a website is a online giving shop which need ssl cetificate in https. website of this is www.123.com, it will redirect tow this website owner don't want to show What can I do to achieve this ? Can I use rewrite function in apache to achieve this? How? or we need to buy any other ssl certificate for www.123.com? How can I install multiple sslcertificate in one apache server?
View 4 Replies
View Related
May 17, 2010
Now, I use Fedora Core (version 8) with core linux OS 2.6
I have some file data with size about 2G and I want to burn (write) this file to DVD rewrite.
I know linux OS can install software to burn data to DVD, but I don't have permission to install more software. I only use command line over Terminal (Gnome Terminal).
View 4 Replies
View Related
Jun 27, 2010
I have been working on this for the last couple of days, but I don't seem to be getting anywhere with it.
I have a Fedora 12 64bit Server set up, and for the most part it's working Great. I have 3 VHost set up, and no problems with that.
My problem is I just moved my Wife's xcart store from Godaddy to this server. And the store works great. But xcart is set up to use Clean URL's, and this is what I seem to be having all the problems with.
In my "httpd.conf" file, I have "AllowOverride All" to use ".htaccess" and in xcart ACP I have it set to use Clean URL's. I added a ".htaccess" file to root folder, with this in it.
Quote:
Now if you try to log in to the store with just the base url "www.my_site.com/" I get a the Apache Test page. But if I enter "www.my_site.com/index.php" the Home page opens, and all clean url's from there work fine. ALL other pages will open just fine. So clean URL's is working. Its just the home page that won't load right.
Now if I change the ".htaccess" file, and set "RewriteEmgine Off", then the home page will load like it should with the base url., but then "Clean URL's" no longer work. I have to change "AllowOverride All" to "AllowOverride None" and turn Clean URL's off in the ACP of xcart. to get the store working again.
Then the whole site works just fine, just No Clean URL's. I'm at my wits end with this, don't know what else to try to get this to work. So I was hoping someone here might have an answer, or at least some ideas to try. This all worked just fine on GoDaddy's site, I left because it was just too dam slow. It took a minute and a half just to load the Home Page. On my server its less that 2 seconds. And every time I asked them about it, it would speed up for a few days then slow down again. But the same .htaccess file worked on that server. So I think my problem is in my "httpd.conf" file just don't know where.
View 6 Replies
View Related
Dec 27, 2010
I need to have a postfix server to rewrite the sender's address. For example, if the sender is: [URL], then the recipient would receive all emails from [URL] as [URL]. I tried using the generic file and created a table out of it, but this did not work:
postmap /etc/postfix/generic
-rw-r--r-- 1 root root 9977 Dec 27 15:24 generic
-rw-r--r-- 1 root root 12288 Dec 27 15:25 generic.db
I added this line to the generic text file:
[code]....
I am running two boxes with postfix 2.3.3. and 2.1.1 respectively. Both need this configuration. I also added this line:
smtp_generic_maps = hash:/etc/postfix/generic
on the main.cf file. However, this did not work. The one running postfix 2.3.3 is on Centos 5.5, the other one is on SuSe Enterprise 9.
View 14 Replies
View Related
Aug 28, 2010
I've moved a web site from one server to another.I'm also moving the domain name to the new server.In Apache I've got the web site configured up and running with no problems. What I'd like to know if this is possible. I'm wanting to avoid a complete web site rewrite. I've looked into mod_rewrite but I don't think this is right.I only want the web site to look aesthetically pleasing. So if it's not possible so be it. (I'm not a programmer but do have access to the code)
View 2 Replies
View Related
Nov 11, 2010
I have a registered domain that resolves (via dyndns) xxx.mydomain.com to my external facing router -easy no issues there. Behind the router I have several machines (some VMs) running webservers, mail etc... What I want to be able to do is redirect the external traffic based on xxx to the relevant internal machine and serve the content back to the external world.
I have tried using a http rewrite of xxx.mydomain.com to the relevant machine an it works fine from within my network, however externally the re-direct fails as the master DNS servers have no record of internal DNS setup in my network (obviously).
So is there anything I can do to get xxx. recognized externally? I'm only just starting to get my head around how DNS, HTTP, TCP etc all hang together. Am I barking up the wrong tree with rewrite? Should I be looking at proxys?
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
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
Dec 27, 2008
I cannot redirect output from commands such as iptables, iptables-save, and ifconfig. For example, any of the following DOESN'T work ( as root ):
Code:
iptables > tmp
iptables-save > tmp
ifconfig > tmp
The file tmp is ALWAYS blank, that is, 0 bytes in size. Wackier things DO work, such as:
Code:
echo "`iptables-save`" > tmp
iptables-save | tee tmp
Other commands like:
Code:
ls > tmp
DO work as expected.
Note that this problem happens regardless if I log-in remotely via ssh or locally on the computer in question. I am clueless as to what is causing this. Any ideas?The box is running 2.6.25-14.fc9.i686 and boots to runlevel 3. The modifications I've made to the box since installing the OS are things like compiling/installing latest OpenSSH,OpenSSL,httpd,BerkeleyDB,subversion,zlib etc -- nothing really out of the ordinary I'd say.
View 5 Replies
View Related
Aug 21, 2010
I've two internet based server ( xx.xx.xx.xx and yy.yy.yy.yy ) The Y server is running VNC server and is responsible for answering to VNC sessions. But I need to hide the IP of Y server so I want X server to be as VNC Proxy and redirect all VNC sessions to Y server.
I guess the best way is to use iptables but actually I can't get it working so
View 4 Replies
View Related
Apr 6, 2010
I have been beating my head for the last few weeks on this problem, (although I have been taking the wrong approach, it seems).
I need a gateway to direct web traffic to three separate servers/domains. I have been trying to do this with both a dns server and , (seperatly), apache server to forward requests. The dns server was a no go, and <i can only get apache to redirect http and ftp.
After Googling this ALOT, I believe that what I need is a gateway server to redirect my traffic to the 3 different servers. I have been reading about using using nat and iptables for this and was wondering if anyone had any advice/suggestions on this. The other thought I had was to use something like pfSense to create the gateway, but I am still reading the documentation, and I am unsure if this approach will work.
View 1 Replies
View Related
Feb 19, 2010
The issue is that my CentOS workstation is in a vlan from where the Intranet's DNS servers are unreachable. For browsing the web there is an ISA proxy server, which I presume resolves DNS for my firefox. However, wget, host, ping and aria2c fail to get any sort of DNS resolution since they're being run from command line.I have exported HTTP_PROXY value, which provides me internet access on console, but,only when I connect using IP address. It fails on name resolution.
My question is:May I redirect the DNS queries to my home PC which would be running a DNS server on a non standard port?I was thinking of putting nameserver 127.0.0.1 in /etc/resolv.conf and then put iptables rule to redirect 127.0.0.1:53 UDP to a.public.ip.address:3535 UDP..I don't know if I am shooting blanks or what, I am not very much aware of this kind of setup.My main need is to provide DNS resolution to console apps.I want to utilize my company's idle bandwidth for bulk downloads, so, using proxy, SSH tunneling through my Home PC is out of question.
View 8 Replies
View Related
Jun 14, 2010
I know that set -x can be used for debugging a shell script.But I want to redirect the output of set -x to a text file.eg: Say test.sh is my script,
View 3 Replies
View Related
Aug 6, 2010
I am again struggling to make a script work, but hey, it is fun, I am learning new things. I discovered the set -x option which was, for me, like the second coming. Still, what I am not able to do is redirect ALL output to a (log) file, including what is produced by the -x setting. Let's assume a very simple script:
Code: #!/bin/bash
set -x
source="/home/atelier/Bureau/"
ls -la $source and I am running it as . test.sh >> /var/log/test.rmcb.log
The result of ls goes inded into the log file, but the rest still shows on the console where I am running the script: Code: ++ source=/home/atelier/Bureau/
++ ls --color=auto -la /home/atelier/Bureau/ Is there a way to redirect EVERYTHING to the log file ?
View 3 Replies
View Related
Aug 5, 2010
i want to redirect application to file.i m redirecting it by command
konsole -e 'application name' >> applog.txt
but it is not working.
View 6 Replies
View Related
Mar 10, 2010
I have a query on mod_rewite/apache/.htaccessIt is like this:Suppose a company have a website www.abc.com,when a user types in this URL in his browser he should get a login and passwd prompt say he enters username as user1 and some passwd, upon successful authentication he should get redirected to another url similary for user2 and user3...mod_rewite is loaded htpsd.conf has "rewrite engine on" directive enabled.
View 1 Replies
View Related
Mar 9, 2011
I want to redirect the output of a command to a file, but not at the end of the file, but after a line. Do you know how can I do it?
Something like:
cat file_a | grep some_text >> resulting_file
# in this file I need to place the output from grep, but not at the bottom of resulting_file, like it would normally happen, but after line .. 3 , for example
Then, if file_a is:
abc x
some_text q
zxc w
[Code]....
View 2 Replies
View Related
Apr 11, 2011
I'd like to redirect the output to a file and to the console. I know about tee but the issue is that it waits until the first process finishes.e.gecho "hello world" | tee test.txtfirst calls echo and then tee.Is there a way to redirect "on the fly" ?
View 5 Replies
View Related
Apr 11, 2011
I multi-boot several Linux distributions with an assortment of additional data partitions. I get frustrated whenever fsck is forced during boot. (It ONLY happens when I'm in a hurry don't you know...) So I wrote a script to automate forced fscking when I do have the time. (And/or while I'm doing something else in another workspace.
Because I multi-boot, I've learned that udev doesn't always assign the same device name to each drive for all distributions. I've had the same partition identified as hda5, sda5, & sdb5 by different distributions (without doing anything to affect the boot order) So my solution is to keep a list of partitions in a specific file on each distro with valid device names according to that distribution's udev process. Actually I'd use LABEL= instead but the labels don't show up in /etc/mtab, and I like to make sure a partition isn't mounted before I try to fsck it.
I can make this work in a for loop using cat. But I've seen so many things about NOT using cat that I wanted to rebuild my script. I can make this work with a redirect instead of cat via a while loop, But I "LIKE" old style for loops. But I can't seem to find a way to make a redirect work with one. I thought this might make a good first �LinuxQuestions.org� question. I'm also open to any other suggestions on better/alternative methods... Is it possible to redirect from a file into an actual for loop?
My script is as follows:
Code:
#!/bin/bash
# FsckEm I script to force file system checking on unmounted ext2/ext3/ext4
# partitions in preselected list. FsckEm accepts no options. Partition
[code]....
View 5 Replies
View Related