Black Hat Forum Black Hat SEO The only backlink provider with unlimited projects/links per day!
Go Back   Black Hat Forum Black Hat SEO > Black Hat SEO > Cloaking and Content Generators

Cloaking and Content Generators Discuss Cloaking, Doorway pages and Automatic content generators for search engine optimization

TouTube views   BLOG SEO
Search
 
E Serve BPO

LiveChatAgent



Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-16-2012, 09:03 AM
YoutubeSlanger's Avatar
Junior Member
 
Join Date: Nov 2011
Posts: 176
Thanks: 39
Thanked 17 Times in 16 Posts
Reputation: 10
iTrader: (1)
Default how to make a directory with a ? mark in it

im looking to make directories with ? in it. how do I do this.


for example youtsite.com/?mydirectory

I am on hostgator, and I thought it was simple as just creating it but all that comes up is a blank
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 01-16-2012, 09:27 AM
sfidirectory's Avatar
Power Member
 
Join Date: Mar 2010
Location: Newbie I.M SEO Pack: http://bit.ly/imseopack+
Posts: 731
Thanks: 443
Thanked 264 Times in 111 Posts
Reputation: 38
iTrader: (2)
Send a message via Skype™ to sfidirectory
Default Re: how to make a directory with a ? mark in it

I think your "mydirectory" needs a default index file in it, eg index.html, index.php, index.asp, index.shtml... Try doing that and let me know how you go. I've been wondering myself, which is embarrassing since I have been doing web development since 2007.

EDIT: I put "/?" on the end of one of my site's urls and I got shown the home page (which is obviously the index page).
__________________
Newbie I.M SEO Pack: http://bit.ly/imseopack+

Last edited by sfidirectory; 01-16-2012 at 09:29 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sfidirectory For This Useful Post:
YoutubeSlanger (01-16-2012)
  #3 (permalink)  
Old 01-16-2012, 09:30 AM
Corrupt's Avatar
Regular Member
 
Join Date: Sep 2011
Location: On my ass
Posts: 383
Thanks: 284
Thanked 112 Times in 90 Posts
Reputation: 110
iTrader: (0)
Default Re: how to make a directory with a ? mark in it

I haven't done it myself, but I believe it can be done by using mod_rewrite in .htaccess.

EDIT:
See this:
Code:
http://corz.org/serv/tricks/htaccess2.php
Just rewriting the ?directory to directory should work. Lemme know how it goes.
__________________
Experimentation is the key to success, and a healthy sex life.

Last edited by Corrupt; 01-16-2012 at 09:33 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to Corrupt For This Useful Post:
YoutubeSlanger (01-16-2012)
  #4 (permalink)  
Old 01-16-2012, 09:43 AM
Jr. VIP
 
Join Date: Nov 2009
Location: Arkansas, USA
Posts: 150
Thanks: 20
Thanked 31 Times in 24 Posts
Reputation: 23
iTrader: (3)
Send a message via AIM to hi.imandrew Send a message via MSN to hi.imandrew Send a message via Yahoo to hi.imandrew
Default Re: how to make a directory with a ? mark in it

.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . index.php [L]
RewriteRule (.*) index.php?$1 [PT,QSA]
</IfModule>
index.php
PHP Code:
$page $_SERVER['argv'][0];
//if pulling from a database, make sure to secure $page
if (empty($page)){ $page "index.php"; }
//Example http://mysite.com/?folder
//$page will = 'folder' 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to hi.imandrew For This Useful Post:
YoutubeSlanger (01-16-2012)
  #5 (permalink)  
Old 01-16-2012, 05:22 PM
YoutubeSlanger's Avatar
Junior Member
 
Join Date: Nov 2011
Posts: 176
Thanks: 39
Thanked 17 Times in 16 Posts
Reputation: 10
iTrader: (1)
Default Re: how to make a directory with a ? mark in it

Quote:
Originally Posted by hi.imandrew View Post
.htaccess
Code:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule . index.php [L]
RewriteRule (.*) index.php?$1 [PT,QSA]
</IfModule>
index.php
PHP Code:
$page $_SERVER['argv'][0];
//if pulling from a database, make sure to secure $page
if (empty($page)){ $page "index.php"; }
//Example http://mysite.com/?folder
//$page will = 'folder' 
I couldent get this to work

I placed the .htaccess in the directory named ? and created the index.php
created a folder called lol with a index page and calling mysite.com/?lol nothing appeared.

any help
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 01-16-2012, 06:57 PM
roamer's Avatar
Regular Member
 
Join Date: Dec 2008
Location: plɹoʍ ǝɥʇ punoɹɐ ƃuıɯɐoɹ
Posts: 373
Thanks: 374
Thanked 321 Times in 168 Posts
Reputation: 166
iTrader: (0)
Default Re: how to make a directory with a ? mark in it

The ? after the URL means that whatever variables follow are parsed by whatever engine the site runs on, ie. PHP, ASP, Perl. In short, not a valid directory character.
__________________
8< - - - - - - - - - - - - - [ Cut Here ] - - - - - - - - - - - - -
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to roamer For This Useful Post:
YoutubeSlanger (01-16-2012)
  #7 (permalink)  
Old 01-16-2012, 07:43 PM
fatboy's Avatar
Jr. VIP
 
Join Date: Aug 2008
Location: UK
Posts: 844
Thanks: 200
Thanked 1,281 Times in 311 Posts
Reputation: 314
iTrader: (1)
Send a message via Skype™ to fatboy
Default Re: how to make a directory with a ? mark in it

The http://yourdomain.com/?whatever is the same as http://yourdomain.com/index.php?whatever

The htaccess file just gets rid of the index.php part in the URL but redirects all page requests through the file itself. Not the easiest to explain!

Just drop that htaccess file into your root directory - you don't need to make any ? directories etc
__________________
Botcentral.net - Latest bot: Indiamail Account Creator
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to fatboy For This Useful Post:
YoutubeSlanger (01-16-2012)
  #8 (permalink)  
Old 01-16-2012, 10:08 PM
YoutubeSlanger's Avatar
Junior Member
 
Join Date: Nov 2011
Posts: 176
Thanks: 39
Thanked 17 Times in 16 Posts
Reputation: 10
iTrader: (1)
Default Re: how to make a directory with a ? mark in it

I still aint getting it right

this how my root looks

folder
lol

.htacess
index.php

I call mydomain.com/?lol

and nothing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 01-17-2012, 05:15 AM
Jr. VIP
 
Join Date: Nov 2009
Location: Arkansas, USA
Posts: 150
Thanks: 20
Thanked 31 Times in 24 Posts
Reputation: 23
iTrader: (3)
Send a message via AIM to hi.imandrew Send a message via MSN to hi.imandrew Send a message via Yahoo to hi.imandrew
Default Re: how to make a directory with a ? mark in it

index.php
PHP Code:
<?php
$page 
$_SERVER['argv'][0];
if (!
file_exists($page)){
 
//check to make sure the file or directory exists, don't allow redirection to other websites.
 
header("Location: main.htm");
 
//redirect to this page by default
}else{
 
header("Location: $page");
}
die();
//Examples:
//http://mysite.com/?lol
//will redirect you to http://mysite.com/lol
//http://mysite.com/?test.php
//will redirect you to http://mysite.com/test.php
?>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 01-17-2012, 04:47 PM
YoutubeSlanger's Avatar
Junior Member
 
Join Date: Nov 2011
Posts: 176
Thanks: 39
Thanked 17 Times in 16 Posts
Reputation: 10
iTrader: (1)
Default Re: how to make a directory with a ? mark in it

Quote:
Originally Posted by hi.imandrew View Post
index.php
PHP Code:
<?php
$page 
$_SERVER['argv'][0];
if (!
file_exists($page)){
 
//check to make sure the file or directory exists, don't allow redirection to other websites.
 
header("Location: main.htm");
 
//redirect to this page by default
}else{
 
header("Location: $page");
}
die();
//Examples:
//http://mysite.com/?lol
//will redirect you to http://mysite.com/lol
//http://mysite.com/?test.php
//will redirect you to http://mysite.com/test.php
?>
thanks bro, I pmed you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 01-17-2012, 04:58 PM
NOKENNY's Avatar
Newbies
 
Join Date: Mar 2011
Location: Barcelona
Posts: 21
Thanks: 27
Thanked 14 Times in 12 Posts
Reputation: 23
iTrader: (0)
Default Re: how to make a directory with a ? mark in it

if ur web site is static just create directories using your hosting file manager or a ftp program , but if you have a dynamic php script u should use the htaccess method
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 01-17-2012, 05:12 PM
Jr. VIP
 
Join Date: Nov 2009
Location: Arkansas, USA
Posts: 150
Thanks: 20
Thanked 31 Times in 24 Posts
Reputation: 23
iTrader: (3)
Send a message via AIM to hi.imandrew Send a message via MSN to hi.imandrew Send a message via Yahoo to hi.imandrew
Default Re: how to make a directory with a ? mark in it

The way your wanting to do it, instead of redirecting, use an iframe, or preferred way, an include file.

index.php
PHP Code:
<?php
$page 
$_SERVER['argv'][0];
if (!
file_exists($page.".htm")){
 
//check to make sure the file exists
 
$page "main";
 
//include this page by default
}
if (
strstr($page".")){ 
 
//hack attempt
 
$page "main";
}
require_once(
$page.".htm");
//hard code extension to prevent getting hacked
//http://mysite.com/?lol will include lol.htm
?>
I've messaged you on skype if you need further assistance.

Last edited by hi.imandrew; 01-17-2012 at 05:15 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to hi.imandrew For This Useful Post:
YoutubeSlanger (01-17-2012)
Reply

Bookmarks

Backlinks Genie

SE Nuke



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Click Here if you Make Money Online (or want to) MrsE BlackHat Lounge 190 01-09-2012 02:45 AM
If I wish to make my blog an article directory, how should I do it? bloggeroftheweb Blogging 3 02-02-2011 01:44 PM
How this site still stand and still getting this huge amount of traffic!!! nilamoromete Blogging 8 12-02-2009 03:34 PM

BlackHole


Web Hosting
Copyright © 2005 - 2012 BlackHatWorld.com All rights reserved.