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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 12-19-2011, 11:21 PM   #1
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
htaccess rewrite rule help needed.

these both giving me 500 error

RewriteRule ^(.*)$ /search.php?s=$1 [L]



RewriteRule ^([^/]*)$ /search.php?s=$1 [L]

can anybody help. ?

what i wanted to do is

domain.com/anything to go to domain.com/search.php?s=anything

thanks
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-19-2011, 11:32 PM   #2
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
i tried this

RewriteEngine On

<IfModule mod_rewrite.c>
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /search.php?s=$1 [L]
</IfModule>


but if i access

domain.com/somefile.php

it goes to search.,., wtf
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-19-2011, 11:38 PM   #3
RonTheDon
Registered User
 
Industry Role:
Join Date: Dec 2011
Location: United States
Posts: 69
See what this does:

ReWriteRule ^(.*)$ search.php?search.php?s=$1


Notice the removal of '/' from the beginning of search.php

If anything, ping me on ICQ and I'll try and help further.
__________________
ICQ: 609051050
RonTheDon is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 02:10 AM   #4
leg4
Confirmed User
 
Join Date: May 2003
Location: Texas
Posts: 4,429
Any luck? did you get it working?
__________________
>>> Contact me here

email me here
leg4 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 02:59 AM   #5
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
Quote:
Originally Posted by leg4 View Post
Any luck? did you get it working?
nope., something is missing there.,

and even the script is encrypted.,.,
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 05:23 AM   #6
redwhiteandblue
Bollocks
 
redwhiteandblue's Avatar
 
Industry Role:
Join Date: Jun 2007
Location: Bollocks
Posts: 2,793
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) search.php?s=$1

is mine.
redwhiteandblue is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 06:59 AM   #7
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by cooldude7 View Post
these both giving me 500 error

RewriteRule ^(.*)$ /search.php?s=$1 [L]



RewriteRule ^([^/]*)$ /search.php?s=$1 [L]

can anybody help. ?

what i wanted to do is

domain.com/anything to go to domain.com/search.php?s=anything

thanks
bad idea.
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 08:55 AM   #8
raymor
Confirmed User
 
Join Date: Oct 2002
Posts: 3,745
Quote:
Originally Posted by cooldude7 View Post
these both giving me 500 error

RewriteRule ^(.*)$ /search.php?s=$1 [L]



RewriteRule ^([^/]*)$ /search.php?s=$1 [L]

can anybody help. ?

what i wanted to do is

domain.com/anything to go to domain.com/search.php?s=anything

thanks
Either of those lines alone will give you a 500 error.
You definitely need either:
RewriteCond %{REQUEST_FILENAME} !-f

or:

RewriteCond !search.php

Without either, /Ray redirects to search.php?Ray
search.php?Ray redirects to search.php?search.php
search.php?search.php redirects again to search.php?search.php
round and round in a circle
__________________
For historical display only. This information is not current:
support&#64;bettercgi.com ICQ 7208627
Strongbox - The next generation in site security
Throttlebox - The next generation in bandwidth control
Clonebox - Backup and disaster recovery on steroids
raymor is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 09:56 AM   #9
cooldude7
Confirmed User
 
cooldude7's Avatar
 
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
Quote:
Originally Posted by redwhiteandblue View Post
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) search.php?s=$1

is mine.

okie.,

Quote:
Originally Posted by fris View Post
bad idea.
roger that., i left it as it is.,

Quote:
Originally Posted by raymor View Post
Either of those lines alone will give you a 500 error.
You definitely need either:
RewriteCond %{REQUEST_FILENAME} !-f

or:

RewriteCond !search.php

Without either, /Ray redirects to search.php?Ray
search.php?Ray redirects to search.php?search.php
search.php?search.php redirects again to search.php?search.php
round and round in a circle
RewriteCond %{REQUEST_FILENAME} !-f

gives lots of errors.

RewriteCond !search.php

gives 500

thanks for your time.,
cooldude7 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 12-20-2011, 10:28 AM   #10
fris
Too lazy to set a custom title
 
fris's Avatar
 
Industry Role:
Join Date: Aug 2002
Posts: 55,359
Quote:
Originally Posted by cooldude7 View Post
okie.,



roger that., i left it as it is.,



RewriteCond %{REQUEST_FILENAME} !-f

gives lots of errors.

RewriteCond !search.php

gives 500

thanks for your time.,
is this a wp site?

maybe this will interest you, i did this for someone a while back, they wanted

Code:
domain.com/search/search-term.html
Code:
Options +FollowSymLinks
RewriteEngine On
RewriteRule ^search/(.+)\.html$ /index.php?s=$1 [QSA,L]
not sure if this will help you
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


WP Stuff
fris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.