Author:
erics , January 5th, 2021
global $ wp ;
$ slug_missing_outside_slashes = add_query_arg ( array ( ) , $ wp -> request ) ;
$ current_url = home_url ( $ slug_missing_outside _ slashes ) ;
$ form_action = '/' . $ slug_missing_outside _ slashes . '/' ;
https://codex.wordpress.org/Determining_Plugin_and_Content_Directories
Categories: How-To's , Technology Tags: Current , howto , Page , Path , Slug , tips , URI , URL , WordPress
| No comments
Author:
erics , September 5th, 2017
Set browser.autofocus to false in about:config
Categories: How-To's , Technology Tags: about:config , AutoFocus , Browser , browser.autofocus , Config , configure , Firefox , Focus , New Tab , search , Tab , URL
| No comments
Author:
erics , August 29th, 2013
window.location.href.split(‘?’)[0]
Categories: How-To's , Technology Tags: howto , javascript , Query , Query String , tips , URL
| No comments
Author:
erics , October 25th, 2012
$ URL = 'http' ;
if ( $ _SERVER [ "HTTPS" ] == "on" ) {
$ URL . = "s" ;
}
$ URL . = '://' . $ _SERVER [ 'HTTP_HOST' ] . $ _SERVER [ 'REQUEST_URI' ] ;
Categories: How-To's , Technology Tags: $_SERVER , apache , howto , HTTP_HOST , php , REQUEST_URI , Server , tips , URL
| No comments
Author:
erics , September 6th, 2012
var pathname = window.location.pathname;
Categories: How-To's , Technology Tags: howto , javascript , Location , PathName , tips , URL , window.location
| No comments
Author:
erics , December 15th, 2011
Below information copied without permission from Josh Sharp’s site because it is too valuable to lose – great work Josh, and THANKS!
RewriteEngine On
RewriteCond % { REQUEST_FILENAME } ! - d
RewriteCond % { REQUEST_FILENAME } ! - f
RewriteRule ^ ( . * ) $ index . php ? url = $ 1 [ QSA , L ]
Note: Only rewrite if the requested file is not an existing directory (-d) or a file (-f)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
include ( 'app/classes.php' ) ;
include ( 'app/app.php' ) ;
//init our app
$ App = new App ;
//grab the mod_rewrite url
$ url = $ _REQUEST [ 'url' ] ;
//if the url is empty then the user has navigated just to root
if ( $ url == '' ) {
//start with default controller
$ App -> setController ( 'home' ) ;
} else {
//grab each part of our URL - controller, action, and identifier
$ path = explode ( '/' , $ url , 3 ) ;
//pass these onto the app to handle
$ App -> setController ( $ path [ 0 ] , $ path [ 1 ] , $ path [ 2 ] ) ;
}
Categories: How-To's , Technology Tags: apache , mod_rewrite , module , Path , php , Rewrite , SEO , URL
| No comments
Author:
erics , June 5th, 2011
Various Ways to Obtain Various Information:
jQuery ( document ) . ready ( function ( ) {
var Path = window . location . pathname ;
var HREF = jQuery ( location ) . attr ( 'href' ) ;
var Title = jQuery ( this ) . attr ( 'title' ) ;
} ) ;
Categories: How-To's , Technology Tags: howto , JQuery , Location , PathName , tips , Title , URL , window
| No comments
Author:
erics , April 19th, 2011
RewriteEngine On
RewriteCond % { HTTP_HOST } ! ^ www . YourDomain . com
RewriteCond % { HTTP_HOST } ! ^ $
RewriteRule ^ . * $ http : //www.YourDomain.com%{REQUEST_URI} [R=301,L]
Categories: Rants Tags: apache , Domain , domain name , mod_rewrite , RewiteCond , Rewrite , RewriteRule , URL , WWW
| No comments
Author:
erics , October 7th, 2010
To generate a redirection header in CGI.pm use the following syntax where $q is the cgi handle: print $q->redirect(‘http://wyzaerd.com/documents/resume.pdf’); If you use redirection like this, you should not print out a header as well. You should always use full URLs (including the http: or ftp: part) in redirection requests. Relative URLs will NOT work correctly.
Categories: How-To's , Technology Tags: CGI , CGI.pm , howto , http , Location , redirect , tips , URL
| No comments