Ubuntu :: Apache2 Mod_Rewrite - Passing The Artist=$1 To The Server GET Vars
Sep 9, 2010
I've given a bit of support using Mod_rewrite to use magical urls to redirect to scripts, but when I migrated to Ubuntu's Apache2... I'm lost. I basically want to rewrite like this:
Code: RewriteRule ^artist/(.+)/$ artist.php?artname=$1 But I noticed that it wasn't passing the artist=$1 to the server GET vars. Then I noticed that if I changed the name of the file in both the rule and the file system to artists.php, typing artist/blah/ no longer was found. So then I realized that if I removed the rewrite rule artist/hello/ would still resolve to artist.php without any parameters my htaccess is like so:
[Code]...
View 1 Replies
ADVERTISEMENT
Jun 3, 2010
I am running Apache2 on Novell SLES 11. I am using Virtual Hosting for two sites. One site only has a single domain whereas the other site has two domains registered. surrounding my one virtual host with the two domains. I want anyone that point to [URL] gets redirected to [URL]. I am trying to do this for trending but not 100% on how to go about doing this. I've read about mod_rewrite but most of the information I've read about is about a single site running on Apache and not much around Virtual Hosting within Apache. I am currently using Server Alias within my vhost.conf file which allows either [URL] or [URL] to see the site but I really want to redirect [URL] to [URL].
View 12 Replies
View Related
Nov 25, 2010
I want to use rewite module to change my site url from site/index.php to site/cat/ for example I have created .htaccess file in the directory where the file is and add to it:
Code:
RewriteEngine on
Rwerite ^cat$ /site/index.php
Here site is not my site, it just in example. I have rewrite.load in the loading list of modules and I can see it loads in phpinfo(). AllowOverride is set to All for the current site, but no redirect is made on site/cat
View 2 Replies
View Related
Jan 22, 2010
I would like to use mod_rewrite to rewrite all instances of .php and _ in file names in the root directory
So far I have:
But this throws out error 500. Could someone correct my code?
View 1 Replies
View Related
Aug 16, 2011
I am still struggling to get non-www to www. At the moment I have following code to redirect from non-www to www. RewriteCond %{HTTP_HOST} !^www.hoteldealscatcher.com$ [NC]
RewriteRule ^(.*)$ http://www.hoteldealscatcher.com/$1 [R=301,L]It works totally fine for home page but not for other deep links, such as /city/Sydney.php, they are still going to non-www pages. What 's the best approach I could use to solve it
View 6 Replies
View Related
Nov 19, 2010
I have suse10 64 bit installed. I am setting up a svn server on it. After installation and adding the modules ,while reloading the apache2 it's throwing the error as: HTML Code: httpd2-prefork: Syntax error on line 113 of /etc/apache2/httpd.conf: Syntax error on line 31 of /etc/apache2/sysconfig.d/loadmodule.conf: Cannot load /usr/lib64/apache2/mod_dav_svn.so into server: /usr/lib64/libsvn_subr-1.so.0: undefined symbol: apr_memcache_add_server
View 9 Replies
View Related
Dec 9, 2009
I am getting this error
Starting web server: apache2[Wed Dec 09 15:36:40 2009] [warn] NameVirtualHost XX.XX.XX.XXX:80 has no VirtualHosts(99)Cannot assign requested address: make_sock: could not bind to address 68.178.232.100:80
no listening sockets available, shutting down Unable to open logs failed!
also what is 68.178.232.100
View 1 Replies
View Related
Mar 29, 2011
I am having an issue with pureftpd and the way it handles passive mode. Here is a link to a discussion on filezilla.
[URL]
Basically the problem I have is that the Ubuntu Server is not passing the right IP address. It passes the internal "unrecognized IP address"
How do I set up Ubuntu to know it external IP address and pas it during a passive mode FTP connection?
View 1 Replies
View Related
Jun 21, 2010
one of the servers is the "main guy" which has NIS and NFS. the others mount the partition and can log in whith the same "main" account.
my problem is that i need to call a startup script "settings.sh" to set some enviroment variables for the cluster to work.
this script is on the NFS folder.
i would like if possible to call this script as early as possible, even before login phase, since they are servers and can be shutdown, restarted, etc.
at the moment i need to log via ssh into every one of the 4 nodes and do "source /opt/cfc/sge/default/common/settings.sh" manually each time they reboot.
i would like to put this script somewhere so that it gets called after the NFS mount, but without the need to log into an account. is possible?
otherwise i could set the nodes to automatically login into the main account..
im a little confused on something really simple, i know. But on the past i always used .bash_rc, this time i dont want to take that solution.
View 4 Replies
View Related
Jan 12, 2011
i'm programming a small tcp client, but i need that the server knows the source ip. My client receives a external connection and forwards, but the ip seen by the server, of course, is the client ip. I would like, change this ip to original source ip.
I don't know how to do this. I tried with the connect and select function.
View 5 Replies
View Related
Feb 15, 2011
I've installed python2.7 and I want all those convenient python libs I've installed from the repos to work with python2.7, but the libs in the repos get installed to python2.6.
No problem, I'll just set the $PYTHONPATH env var so that python2.7 will look at the python2.6 libs. I defined $PYTHONPATH as I wanted in the .bashrc file, and now python2.7 works as I desire when starting it from the shell.
The problem is when I start python2.7 from the gnome desktop (by clicking an application shortcut or button) it doesn't work. My guess is that the env vars set in .bashrc do not effect the gnome desktop, and so my question is what can I do to set an env var on the desktop?
To demonstrate my problem. If I open a bash shell and type "idle-python2.7 -n" idle will open, and I can "import twisted" without any problem in the idle python shell. However, if I do alt-f2 and run "idle-python2.7 -n" idle will still open but sys.path is not set as I would like and I cannot "import twisted". So there is clearly different behavior between an application started from the shell vs one started from the gnome desktop.
Environmental variables have long confused me, I'm also open to other solutions to my "getting python2.6 libs to run in python2.7" problem.
FULL INSTRUCTION: Both .bashrc and .gnomerc are located in your home directory. Put the following at the end of both files:
You should now be able to import the python libs installed from the repos in python2.7.
View 2 Replies
View Related
Mar 14, 2011
I am new to linux and need to do this in a script.
1. Get all the vars (env command)
2. Set them locally (name, value pair) in script using loop iteration.
Pseudo code
Code:
View 2 Replies
View Related
Aug 3, 2010
I am doing this project for our school. Basically we want to pipe all incoming emails to a script which filters out certain messages (not only spam but duplicates, large messages, etc). If they fail certain criteria, the script simply does nothing.If they pass , then the script should pass the entire message (headers and body) back on to qmail to send. The piping part is not a problem, but I am stuck with the next part. Is there a way to pass the headers and body back to qmail for it to process and send, as if it received it the first time?Some details:A catchall email account is created via Plesk control panel on linux (centos).THe .qmail file in /var/qmail/mailnames/domain.com/catchall/ is edited to include the line:-|/path/to/pipe/handler.phpThe handler.php file simply reads the entire message (headers and body) and they are then parsed and analysed.
View 2 Replies
View Related
Oct 15, 2010
I'm running freeradius2-2.1.7-7.el5, on CentOS 5.5. I have gotten all of the authentication setup for active directory and I know that the machine is able to pass requests along to our AD server. However it doesn't appear that freeradius is doing the same. I have been looking at the attached radius -x output for about 2 days now and I have done a ton of searching and have come up relatively empty handed.
View 3 Replies
View Related
Sep 3, 2010
I need a list of shell variables without values and without finctions. Can't find an option for set or typeset to print values only
View 4 Replies
View Related
Nov 10, 2010
On our server we have a certain directory, say /storage, that contains many large files. They are all compressed (gzip). Many of our users are not computer-savvy, and so when one of these files is needed, they will copy it to their own directory. Consequently, we have multiple terabytes of duplicate data. I'd like to enforce an alias whereby if someone tries to use cp on a file from /storage, they will instead create a symbolic link. My idea was something like:
alias cp='cp.storage'
File cp.storage:#!/bin/sh
truePath=$(readlink -f "$1")
[code]....
The conditional checks whether the file being copied begins with "/storage". The problem with this is that if someone wanted to use cp with any options on a file not in /storage, those options would be obliterated. Can someone guide me as to a good way to accomplish this? Either a way to get the options from cp into cp.storage, or another approach not using alias this way. Everyone will be using bash.
View 2 Replies
View Related
Oct 8, 2010
# variable declaration
stt=10
enn=20
stp=1
# I want to do it in the following structure but not sure how to call # the stt, enn and stp in a for loop
for (( i = $stt; i -le $enn; i=i + $stp ))
do
blah blah
done
View 9 Replies
View Related
Oct 24, 2010
Using Debian Lenny I'm getting the following message in my mail: /etc/cron.daily/logrotate:
Quote:
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
View 1 Replies
View Related
Apr 17, 2011
Trying to track down reasons why mod_rewrite won't load, I found this site; hopefully, this will reduce the idiocy of this question.
Based on it and other sources:
Code:
graton# locate mod_rewrite.so
/root/share/openh323/lib/apache2/modules/mod_rewrite.so
/root/share/pwlib/lib/apache2/modules/mod_rewrite.so
[code]...
View 2 Replies
View Related
Mar 30, 2010
I did some reading on Openvpn and am following some instructions I found @ Install & Configure OpenVPN SSL VPN in SUSE & openSUSE Linux | SUSE & openSUSE
I keep getting the same error message when I run the . ./vars command
"NOTE: If you run ./clean-all, I will be doing a rm -rf on /etc/openvpn/easy-rsa/2.0/keys"
But when I run ../vars I get
"Bash: ../vars: Permission denied"
View 1 Replies
View Related
May 6, 2011
I am very new to shell scripting.How does one pass a command-line parameter to a shell script?for the below program
#/bin/bash
mount -t cifs -o user=ramkannan,password=Linux123@ //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql
I want to pass parameter for everything,i tried in google and did but iam getting error while passing parameter to all
#/bin/bash
mount -t cifs -o user=$1,password=$2 //10.200.1.125/ramkannan /MT
cd /MT/test
date=`/bin/date "+\%Y-\%m-\%d-\%H-\%M-\%S"`
mysqldump -uroot -pram2@ employeedb > $date.sql
gzip $date.sql
i was getting error while passing parameter to all.
View 2 Replies
View Related
Aug 29, 2010
My .htaccess file looks like this:
Code:
Options -indexes
RewriteEngine on
RewriteBase /
[Code].....
View 3 Replies
View Related
Jun 9, 2011
its been kinda bugging me for awhile that i cant find a way to hide the list of artists in banshee. i just want to see the album grid. is there any way to do that? i attached a screenshot to help show what i mean.
View 1 Replies
View Related
Jun 27, 2011
I have mod_rewrite and mod_proxy loaded properly for the apache2 package in 11.04. I added the following to the bottom of my apache2.conf:
RewriteEngine: On
RewriteRule: ^/$ /test [L]
The server restarts fine, but / is not getting rewritten in the slightest. And when I added the RewriteLog directive, the log file had absolutely nothing in it.
View 3 Replies
View Related
Mar 21, 2011
I dont know if there is any functions in bash that helps you to get the artist of a mp3 file. The artist usually appears in the properties details of the file.
View 2 Replies
View Related
Apr 14, 2010
Is there any way to make rhythm box, order by artists but ignore 'The' at the beginning of artist names?
View 2 Replies
View Related
Jun 16, 2010
I was glad to see another release of exaile. I'm always happy to see improving mainstream desktop apps, especially when they start being much superior to their commercial counterparts in both, quality and quantity, of features. But as if developers are ignoring the simple usability problems - again - exaile like all other gnome music players (apart from amarok, but that's kde!) can't browse your library by album artist!
View 8 Replies
View Related
Apr 25, 2011
I have tried this a million ways, got it to work once but it didn't work sitewide for some reason. I have a url: [URL] and I want it to be found by going to: [URL] I am using this
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^([^/]+)/?$ agents/tp/$1/index.php [L]
and have also tried something as basic as
Code:
RewriteCond %{REQUEST_URI} ^/agents/tp/
RewriteRule ^(.*)$ agents/tp/$1/index.php [L]
I keep getting "The requested URL /JoeAgent/ was not found on this server." why it's not working?
View 4 Replies
View Related
May 12, 2010
I'm running 10.04 with Apache2/PHP5.x I wanted to test some basic cgi scripts, but my browser is displaying the code (#!...) If I run the scripts on the console, they work fine so CGI is not the problem, it's apache. To install the CGI module I ran sudo apt-get install libapache2-mod-perl2 with no problems. By the way, I installed Apache through apt-get instead of doing it manually, but it seems that the installation divides the conf file in different parts, so the regular apache2.conf has this:
Code:
# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf
# Include all the user configurations:
Include /etc/apache2/httpd.conf
# Include ports listing
Include /etc/apache2/ports.conf
[Code]....
I can't figure out what I need to do to get CGI working on my server.
View 9 Replies
View Related
Feb 19, 2011
I have ubuntu 10.10. I installed apache2 Php mysql and phpmyadmin through the package handler. it worked after that I instaled Imagemagick , and imagick for PHP. than I installed mod_rewrite for appache2. I created a folder in /var/www/ called shimmie. I copied there my codes and after setting up htaccess it worked fine. url rewrite worked. thumbnails with imagick appeared along with normal images. Yesterday I got another webpage project. but it required apache mod_ expires and mod_headers and installed it. And installed Xdebug for PHP. after this I put the webpage to another /var/www/ folder called fashion. Now in fashion everything works as its needs to: url rewrite , expires.. everything. But now my original folder shimmi, doesnt works: no url rewrite, no imagick thumbnails nor the original image shows up.
the folder belongs to my user and set is that every thing can read it and write it.
EDIT: I even copied the shimmie folder toa new and still didnt work, so i re created it... and still doesn't work.... why is thats the only thing that cant use .htacces and imagick?
[URL]
View 1 Replies
View Related