|   |   |   | ||||
| Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. | 
|    | 
| 
 | |||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. | 
|  | Thread Tools | 
|  07-19-2006, 09:40 PM | #1 | 
| Confirmed User Industry Role:  Join Date: Mar 2004 
					Posts: 4,027
				 | 
				
				ANy programmers here know how to do an if/else??
			 I just need something that says if /2/ appears in a url, then change it to /3/.  I want it to go to a different folder. Anyone know how to do this with php, or javascript? is that going to slow down the page a lot? | 
|   |           | 
|  07-19-2006, 10:00 PM | #2 | 
| Confirmed User Join Date: Nov 2004 Location: scv 
					Posts: 2,299
				 | May want to use mod_rewrite. | 
|   |           | 
|  07-19-2006, 10:01 PM | #3 | 
| Let's do some business! Industry Role:  Join Date: Sep 2004 Location: Austin, TX 
					Posts: 31,339
				 | I haven't done much programming in a long time and I wasn't the best, but I think for something like that you would be much better off using regular expressions, not if/else. 
				__________________ Vacares - Web Hosting, Domains, O365, Security & More - Paxum and BTC Accepted Windows VPS now available Great for TSS, Nifty Stats, remote work, virtual assistants, etc. Click here for more details. | 
|   |           | 
|  07-19-2006, 10:03 PM | #4 | |
| <&(©¿©)&> Industry Role:  Join Date: Jul 2002 Location: Chicago 
					Posts: 47,882
				 | Quote: 
  
				__________________ Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager  Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager | |
|   |           | 
|  07-19-2006, 10:06 PM | #5 | 
| Confirmed IT Professional Industry Role:  Join Date: Nov 2005 Location: Hollywood, CA 
					Posts: 3,744
				 | Need to use mod_rewrite for that one. 
				__________________ The Best Affiliate Software, Ever. | 
|   |           | 
|  07-19-2006, 10:19 PM | #6 | 
| ►SouthOfHeaven Join Date: Jun 2004 Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
					Posts: 28,609
				 | <?php $this = $PHP_SELF; if (preg_match("/\/2\//", $this)) { echo "folder found"; } else { echo "folder not found"; } ?> if the folder name your looking for is 2 like www.yoursite.com/nastylady/2/something.html 
				__________________ hatisblack at yahoo.com | 
|   |           | 
|  07-19-2006, 10:24 PM | #7 | 
| ►SouthOfHeaven Join Date: Jun 2004 Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer 
					Posts: 28,609
				 | whoops i think i misunderstood your question actually. you want to rewrite all urls on the page or if the php itself is in a folder called /2/ ? 
				__________________ hatisblack at yahoo.com | 
|   |           | 
|  07-19-2006, 10:53 PM | #8 | |
| 8.8.8.8 Industry Role:  Join Date: Mar 2006 Location: Noordermarkt 
					Posts: 30,509
				 | Quote: 
  
				__________________ TAEMDLRMSKRJIXMRLSMRJ. | |
|   |           | 
|  07-19-2006, 11:07 PM | #9 | |
| Confirmed User Industry Role:  Join Date: Mar 2004 
					Posts: 4,027
				 | Quote: 
 when the url says http://www.whatever.com/porn/2/ I want to rewerite it to say http://www.whatever.com/porn/3/ automatically because there are a ton of links | |
|   |           | 
|  07-19-2006, 11:19 PM | #10 | 
| Confirmed User Join Date: Jun 2005 Location: The Netherlands 
					Posts: 365
				 |   
 Let me know ;) Best Regards, Adult SEO 
				__________________ The key to get ranked one in Google is to provide the best. | 
|   |           | 
|  07-19-2006, 11:40 PM | #11 | 
| Confirmed User Join Date: Nov 2004 Location: scv 
					Posts: 2,299
				 | Drop this in your .htaccess in the /porn/ directory for a redirect... RewriteEngine On RewriteRule ^2/$ /porn/3/ [R] | 
|   |           | 
|  07-19-2006, 11:49 PM | #12 | 
| Confirmed User Join Date: Jun 2005 Location: The Netherlands 
					Posts: 365
				 | In that case better use:  Code: RewriteEngine on rewriterule ^2/$ http://www.domain.com/ [r=301,L] rewriterule ^2/(.*)$ http://www.domain.com/$1 [r=301,L] 
				__________________ The key to get ranked one in Google is to provide the best. | 
|   |           | 
|  07-19-2006, 11:55 PM | #13 | 
| ... Join Date: Jan 2006 Location: Maryland      ICQ:87038677 
					Posts: 11,542
				 | php sucks inrl 
				__________________ ... | 
|   |           |