Archive for Sachin Wable

Dynamic URL redirect within particular subdomain using .htaccess

Share

Below are the lines you need to add in your .htaccess file to redirect /services/blahblah URLs to /offerings/blahblah for the sub domain mentioned in line 1 below (en.domainnamegoeshere.com). Dynamic URL redirect.

RewriteCond %{HTTP_HOST} ^en.domainnamegoeshere.com$
RewriteRule ^services/(.*)$ http://en.domainnamegoeshere.com/offerings/$1 [R=301,L]

Above lines will redirect all the URLs in pattern below.

Redirects
http://en.domainnamegoeshere.com/services/web
to
http://en.domainnamegoeshere.com/offerings/web

This will NOT redirect similar URLs in OTHER sub domains of your site except en.domainnamegoeshere.com.
Read more

Sharing is cool...Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
2,011 views

How to change “apply” button text in Drupal Views exposed filters

Share

Below are the things you will need to do to know how to change “apply” button text




1) Open your current themes template.php file

2) append following function in it. Read more

Sharing is cool...Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
6,340 views

Goo.gl API: PHP Shorten URL using googles URL shortening service

Share

goo.gl

Looking for PHP api to make url shortened using goo.gl? Here is the solution..

http://Goo.gl PHP API to shorten your URL..



Just get Google API key form http://code.google.com/apis/console/ and use it in the code below. That’s it. You will have your URL entered in line 1 shortened in last echo statement in the code below. 🙂
Read more

Sharing is cool...Share on Facebook
Facebook
Tweet about this on Twitter
Twitter
Share on LinkedIn
Linkedin
5,160 views