Search Results

Search found 10299 results on 412 pages for 'apache'.

Page 199/412 | < Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >

  • Using Mod_Rewrite in HTTPD.CONF file

    - by Mike Lovely
    I want to rewrite URLs so when a user goes to; http://www.example.com/applications/newWeb/www/index.php?page=48&thiscontent=2660&date=2013-10-11&pubType=0&PublishTime=09:30:00&from=home&tabOption=1 and if the URL contains thiscontent=2660 (which in this example above, it does) I want to redirect them to; http://www.example.come/index.php/publications/finance-and-economics/departmental-resources I have about 30 different thiscontent=XXXX types and imagine I’ll have to copy and edit this rule 30 different times for any links to my old website still knocking around out there. I have access to my httpd.conf file but have never done a mod_rewrite before. I also don't really need these showing up in the error logs as 301s. Will that happen? Because at the moment there are hundreds!

    Read the article

  • TV Guide script - getting current date programmes to show

    - by whitstone86
    This is part of my TV guide script: //Connect to the database mysql_connect("localhost","root","PASSWORD"); //Select DB mysql_select_db("mytvguide"); //Select only results for today and future $result = mysql_query("SELECT programme, channel, episode, airdate, expiration, setreminder FROM mediumonair where airdate >= now()"); The episodes show up, so there are no issues there. However, it's getting the database to find data that's the issue. If I add a record for a programme that airs today this should show: Medium showing on TV4 8:30pm "Episode" Set Reminder Medium showing on TV4 May 18th - 6:25pm "Episode 2" Set Reminder Medium showing on TV4 May 18th - 10:25pm "Episode 3" Set Reminder Medium showing on TV4 May 19th - 7:30pm "Episode 3" Set Reminder Medium showing on TV4 May 20th - 1:25am "Episode 3" Set Reminder Medium showing on TV4 May 20th - 6:25pm "Episode 4" Set Reminder but this shows instead: Medium showing on TV4 May 18th - 6:25pm "Episode 2" Set Reminder Medium showing on TV4 May 18th - 10:25pm "Episode 3" Set Reminder Medium showing on TV4 May 19th - 7:30pm "Episode 3" Set Reminder Medium showing on TV4 May 20th - 1:25am "Episode 3" Set Reminder Medium showing on TV4 May 20th - 6:25pm "Episode 4" Set Reminder I almost have the SQL working; just not sure what the right code is here, to avoid the second mistake showing - as the record (which indicates a show currently airing) does not seem to work at present. Please can anyone help me with this? Thanks

    Read the article

  • Strange mod_rewrite problem; Website works partially

    - by Camran
    I have Ubuntu 9.10 Server... I need to get mod_rewrite working... the mod_rewrite module IS LOADED. On my server, the httpd.conf is empty, instead everything (almost) is in a file called apache2.conf. Anyways, I have also read I have to change the AllowOverride None to AllowOverride All in some file... My httpd.conf is empty as you know, but I have a folder called sites-enabled which contains a 000-default file. This is where I have set: AllowOverride All Now my goal as I stated in the last Q is to turn this link: http://mydomain.com/ad.php?ad_id=Bmw_nice_M3_497379462 into this: http://mydomain.com/Bmw_nice_M3_497379462 So as I got an answer in the last Q i inserted this into the htaccess file: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{REQUEST_URI} !^/ad\.php RewriteRule ^(.*)$ ad.php?ad_id=$1 [L] Now, this works (no fully) when entering the url manually in the adress bar, but my website isn't working now for some reason. It is like the website is locked down or something, and unless I change AllowOverride to None it will act like that. Any ideas why? Also another note, the links inside the rewritten url doesn't work properly (images are not shown, while some are shown)...

    Read the article

  • Can anyone tell me whats wrong with this htaccess code

    - by mathew
    I am not able to get through with this code...I need to capture the request but with this code I am able to redirect but it cannot find the particular search page. RewriteCond %{THE_REQUEST} ^[A-Z]+\ /searcha\.php\?name=(www\.)?([^/\ ]+)[^\ ]*\ HTTP/ RewriteRule ^.*$ http://www.mydomain.com/%2? [R=301,L] can any one tell me what is I am missing??

    Read the article

  • Automatic backup

    - by xRobot
    I need to backup automatically daily my database in mysql and all image files on the server. Is there a way to backup these things and send it on my email address ?

    Read the article

  • mod_rewrite: check if isn't a certain domain

    - by weingage
    I'm migrating some code from a working web app, but can't get it to work on the new server. Everything seems to be configured correctly, but I'm getting internal redirect limit errors in Apache2. Here are my rewrites and explanation This WORKS - any subdomains that aren't cdn. or manage. should be redirected to u.php RewriteCond %{HTTP_HOST} ^(^.*)\.mediasprk\.com$ [NC] RewriteCond ^(.*)$ !^(cdn|manage)$ RewriteCond %{REQUEST_URI} !\.(png|gif|jpg)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ u.php?uri=$1&hostName=%{HTTP_HOST} This is no longer working. Goal here is to handle CName pointing. So if it's not my app domain (mediasprk.com), then handle it by sending it to u.php. RewriteCond %{HTTP_HOST} !^mediasprk\.com$ [NC] RewriteCond %{REQUEST_URI) !\.(png|gif|jpg)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ u.php?uri=$1&hostName=%{HTTP_HOST} Can anyone see the issue here in the second block that would cause the redirect limit errors? Maybe something wrong in the rewrites? Thanks.

    Read the article

  • Is It possible to change dynamically delay on a Scheduled Poller in Camel via JMX?

    - by sebbrousse
    I would like to set/change the delay of a File consumer at runtime through JMX. I am able to change the value of the property but it doesn't seem to be taken into account until I restart the consumer. Example with the camel-archetype-java and its basic file example: Run It Change the delay of the File Consumer by calling the setDelay Operation with the JConsole Delay property of the Consumer is changed but logs show it continues to poll at 500ms by default Stop/Start the consumer New value of delay is used by the consumer Do I need anothers steps or active any configuration to make it work at runtime?

    Read the article

  • Placing .htaccess file in var/www folder messes my website up...

    - by Camran
    I am playing with mod_rewrite now, and have successfully enabled it. However, I need to put a htaccess file inside var/www/ in order to achieve what I want, which is to rename Urls simply... When I place it my website becomes very strange and nothing basically works... Is there any code I need to put into the htaccess file in order for things to act normally? Here is the htaccess file I have so far: Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteCond %{REQUEST_URI} !^/ad\.php RewriteRule ^(.*)$ ad.php?ad_id=$1 [L] My DocumentRoot is also set to var/www/ and my entire website root is there... (index.html etc etc)... What am I missing about the htaccess? If you need more input let me know...

    Read the article

  • Broken php/localhost/something

    - by ghego1
    I was trying to install the mcrypt libraries following this tutorial (http://www.glenscott.co.uk/blog/2011/08/29/install-mcrypt-php-extension-on-mac-os-x-lion/), but something must have gone wrong and now when I load a php page on my localhost I see this: query="SELECT DISTINCT ".$field." as a,".$field2." as b FROM ".$tab." ".$where. " Group by ".$field." order By ".$orderBy; return $this->query; } And all the remaining code of the php page that should get loaded. I've retrieved the previous versions of the private/etc folder and usr/lib/php folder with time machine but it didn't help. And now if I execute sudo pachectl restart it gives me this error: sudo: no valid sudoers sources found, quitting (while before it worked. PS I'm on a mac with Mountain Lion

    Read the article

  • mod_rewrite - Don't get a second rule work

    - by poru
    I want to have a url like this: domain.com/css/site.css?test=234 Rule: RewriteEngine On RewriteRule ^([a-z]+)/$ $1.php RewriteRule ^css/([a-zA-Z0-9]+).css?count=(.*)$ css.php?f=$1&test=$2 But I get every time a 404: Not found (site.css) If I have a rule like that it works, just without getting the $_GET-Variable: RewriteEngine On RewriteRule ^([a-z]+)/$ $1.php RewriteRule ^css/([a-zA-Z0-9]+).css$ css.php?f=$1

    Read the article

  • replay in django + apcahce + mod_wsgi ??

    - by Adam
    I have a simple django page that has a counter on it. I use Apache2 and mod_wsgi to serve it. First, when I enter this page, the counter shows 0, as it should. The second time when I enter the page the counter shows 1 - again, it is the right behavior. The problem begins now, cause when I enter this page the third time, I get 0 again. When I refresh it goes between 0, and 1, clearly using some cache or so. If I wait for some time and then try again, it will show 2, and 3, but will be stuck with those values, till this cache or whatever it is will be flushed, and then the counter continues. Does somebody knows how I can get it work right (the real scenario deals with getting data from the DB, but the problems with this strange cache are the same). BTW, I don't have any caching engine set in my django settings.

    Read the article

  • htaccess turn on php flags if certain IP address

    - by fire
    In my .htaccess file I need to turn on the following: php_flag display_errors On php_value error_reporting 2147483647 However I only want to do this if my IP is visiting the site. Any ideas? Something like... if (ip == "x.x.x.x") { php_flag display_errors On php_value error_reporting 2147483647 } Need to do this in .htaccess NOT in the PHP thanks!

    Read the article

  • Very simple mod_rewrite questions

    - by Camran
    1- Does mod_rewrite means that if I make this url: domain.com/ad.php?id=8498292 INTO domain.com/8498292 that all links on my website will have to be changed to the later above? example the link: domain.com/ad.php?id=8498292 wont work now, unless I replace it with domain.com/8498292 ? Or will the server know that they are the same still? 2- Will the rewritten link appear rewritten in the browsers adress bars also, so if I enter domain.com/ad.php?id=8498292 it will actually appear as domain.com/8498292 in the adress bar itself? 3- Will images and all other related links and material on the page whose link is rewritten remain intact? ie will pictures and links still work FROM that page which are relative? Thanks

    Read the article

  • How Session Works?

    - by learner
    Any body can explain me how session works in PHP. for eg. 3 users logged into gmail. how the server identifies these 3 uers. what are the internel process behind that.

    Read the article

  • Any reasons not to gzip?

    - by Haroldo
    I remember someone telling me that gzipped content is not cached on some browsers? is this true? Are there any other reasons why I shouldn't gzip my content (pages, javascript and css files) with htaccess?

    Read the article

  • How to hide URL from users when submitting this form?

    - by Camran
    I have a form with many many fields... When submitting these fields, I use the POST method which hides the actual variables passed along to the PHP page. However, I can't get rid of the complete link. Changing from GET to POST did make all the form fields invisible in the URL, but this part is still visible: mydomain.com/bin/query# I want it to be invisible, or say: mydomain.com/search I have mod_rewrite enabled so there is a possibility to do this with mod_rewrite I think, but I am new to mod_rewrite so I need your help... How should I hide this URL? If you need more input let me know...

    Read the article

  • SE friendly URLs quick start

    - by Dan
    I want example.com/23-45 be transformed to example.com?id=23-45 Could you please post the code I should add to .htaccess file to make this work (Is this everything I should do to make this work - add a piece of code to .htaccess file ???) Thanks a lot!

    Read the article

  • Removing a text block from a file : sed ?

    - by user555338
    Hi, Following an attack, I need to remove 4 lines of text added to .htaccess files in my site, and was thinking SED would be the way to go, but cannot see how in spire of many attempts. The added lines are RewriteEngine On RewriteCond %{HTTP_REFERER} ^http:// RewriteCond %{HTTP_REFERER} !%{HTTP_HOST} RewriteRule . http://targeturlhere.net/%{REMOTE_ADDR} I managed to create the script to remove added htaccess files containing those lines only, but for existing htaccess files in which that was appended I have to edit the file and cannot delete it. I cannot just remove line by line nor use "RewriteEngine On" as the start marker, as this instruction "RewriteEngine On" is sometimes legitimate elsewhere in the file. In most cases those lines are the last, but I guess in other files they could be in the middle, so I was trying to remove exactly that block - and have a script I could reuse in a similar case. (Edit: my 4 lines are below one another, no blank line in between but the editor here seems to either show no breakline, or one adding a blank line) Any hint or tip ? Thanks.

    Read the article

  • removing forward slash in .htaccess

    - by user1083644
    I am using Jobbersbase for my online job portal. In which i have given link to my main webpage page like this http://www.mydomain.com/aboutus.html, but its not working because the link is taking '/' at the end http://www.mydomain.com/aboutus.html/ I tried adding RewriteCond %{REQUEST_FILENAME}\.html -f in .htaccess , if i add that other links doesnt work which has / for example http://www.mydomain.com/jobs/ Now my .htaccess looks like this # AddType x-mapp-php5 .php # AddHandler x-mapp-php5 .php RewriteEngine On RewriteCond %{REQUEST_URI} .*/$ RewriteRule (.*)/$ $1 ErrorDocument 404 /page-unavailable/ <files ~ "\.tpl$"> order deny,allow allow from none deny from all </files> Someone please suggest me how to do it thanks

    Read the article

  • how do I redirect from one page to another with mod_rewrite?

    - by Dan
    All the advice online says do: rewrite 301 URL-A URL-B But that won't work if I turn on mod_rewrite (it seems?) with RewriteEngine on So, I'm bad a regex, but shouldn't need it here. How do I do: RewriteCond %{HTTP_HOST} ^untamed-adventures.com/travel/How/tabid/58/Default.aspx [NC] RewriteRule ^(.*)$ http://untamed-adventures.com/ [R=301,L]

    Read the article

< Previous Page | 195 196 197 198 199 200 201 202 203 204 205 206  | Next Page >