Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Geronantimo

    Rewrite root to specific page

    After a final last ditch attempt, I have found that this seems to be working ... RewriteEngine On Options +FollowSymlinks RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com$ [NC] RewriteRule ^$ /new-page.html [L] Can anybody see anything wrong with it?
  2. Geronantimo

    Rewrite root to specific page

    Is it possible to rewrite the root to a specific page? I would like the visitor coming to http://www.domain.com to be automatically taken to http://www.domain.com/new-page.html I have tried various things, but they don't work. RewriteEngine On Options +FollowSymlinks RewriteCond %{HTTP_HOST}...
  3. Geronantimo

    Rewrite CSS file for different domains

    Thanks for the help Feherke, The two domains in question do have completely different content, but the styles-sheets give each site a different look and feel so the managing the stylesheets was the quickest way to make a visual difference.
  4. Geronantimo

    Rewrite CSS file for different domains

    Hi, We have a website that can be accessed using two different domains names. Using the .htaccess file, is it possible to deliver a different CSS file depending on which domain name is used to access the website?
  5. Geronantimo

    URI Dependent Content

    Thanks to feherke, IPGuru and jpadie, I shall test all three approaches and see which works best for my purposes.
  6. Geronantimo

    URI Dependent Content

    I am having difficulty getting this to work... I have some code that I would like not to display on particular webpages. I have a line of PHP like this: <?php if ( $_SERVER['REQUEST_URI'] !== "/" ) { ?> html content <?php } ?> This works inasmuch as the HTML content is not displayed on the...
  7. Geronantimo

    htaccess rewrite all except index.html

    Follow up, I have this working to redirect all requests apart from "index.html": RewriteCond $1 !^index\.html$ RewriteCond %{HTTP_HOST} ^domain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.domain.com$ RewriteRule ^(.*)$ http://sub.domain.com/$1 [R=301,L] The only part that I have not worked out is...
  8. Geronantimo

    htaccess rewrite all except index.html

    I have an existing website that will now be moved to a subdomain. I would like to use rewrite rules to redirect all of the requested pages to the subdomain apart from the index.html and requests that come to the website using just the domain name (without index,html) I have got as far as...
  9. Geronantimo

    Chacters are escaped in Snippets script

    I am using a small script for saving code snippets. The script saves each snippet in a text file. It is adding escape characters to some of the code: snippet: if(strstr($HTTP_ACCEPT_LANGUAGE,"en")) { and this is how it is saved in the text file: if(strstr($HTTP_ACCEPT_LANGUAGE,\"en\")) { How...
  10. Geronantimo

    Outgoing Spam Test - Plugin

    Thanks for replying 58sniper, Are you saying that if my e-mail client was using such a plugin, it would not be able to connect to the Internet and make the checks that you have mentioned? Why can't the plugin allow the user to input the SMTP server information? Most of the rest of the...
  11. Geronantimo

    Outgoing Spam Test - Plugin

    Hi, Does anybody know of a plugin or tool that can can test my outgoing e-mails for a "spam score" before they are sent? I use The Bat! e-mail client and the ideal solution would be a small service or plugin that can quickly test my outgoing e-mail and then stop the message from being sent if...
  12. Geronantimo

    Allw, Deny and Redirect

    Resolved This is what I needed to do: RewriteEngine On RewriteCond %{REMOTE_ADDR} !^10\.20\.30\.40 RewriteRule /.* http://www.otherdomain.com/ [R=301,L]
  13. Geronantimo

    Allw, Deny and Redirect

    Is it possible to use the .htaccess file to specify IP addresses that are allowed to access pages, with all others being redirected using the mod_rewrite? I have tried this (and a number of other combinations) but without success: order deny,allow deny from all Allow from 10.20.30.40...
  14. Geronantimo

    css depending on link destination

    Hi Feherke, That's fantastic! I had no idea that was possible but this will be incredibly useful. Many thanks.
  15. Geronantimo

    css depending on link destination

    Hi, Can anybody advise me whether it is possible to use an "if" statement to style a specific link when it appears on a page? The link appears like this in the browser's source code: <li class="level1 item9"> <a href="/br/link.html" class="level1 item9"> <span>Best Link</span> </a> </li> I...
  16. Geronantimo

    Splitting Results from RegEx Query

    Is it permissible to post a link to a working example or to a small zip file?http://www.44-46-dev.com/e-mail_extractor/e-mail_extractor.zip
  17. Geronantimo

    Splitting Results from RegEx Query

    Thanks for your help jpadie, would you like to see a demonstration?
  18. Geronantimo

    Splitting Results from RegEx Query

    Thanks again jpadie, I have found the solution using a slightly different technique: $forminput .= "$_POST[emailtext]"; function extract_emails_from($string){ preg_match_all("/[\._a-zA-Z0-9-]+@[\._a-zA-Z0-9-]+/i", $string, $matches); return $matches[0]; } $text = $forminput; $emails =...
  19. Geronantimo

    Splitting Results from RegEx Query

    Hi jpadie, Thanks for your reply. In your post above, you have a red open and close bracket either end of the regex - are these to be removed? And, the [0] - Is this also to be removed? I replaced my function with the function you supplied and received an error: "Parse error: syntax error...
  20. Geronantimo

    Splitting Results from RegEx Query

    First, I hope this is the appropriate board for a RegEx query... I have a small script that takes the input from a form textarea and tries to extract all of the e-mail addresses. It works very well and the output shows each e-mail address separated with a space. Can anybody tell me how I can...

Part and Inventory Search

Back
Top