![]() |
![]() |
![]() |
||||
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 |
![]() |
#1 |
Confirmed User
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: May 2003
Location: Texas
Posts: 4,429
|
Any luck? did you get it working?
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Bollocks
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.
__________________
Interserver unmanaged AMD Ryzen servers from $73.00 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Confirmed User
Join Date: Oct 2002
Posts: 3,745
|
Quote:
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@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 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | ||
Confirmed User
Industry Role:
Join Date: Nov 2009
Location: Heaven
Posts: 4,306
|
Quote:
okie., roger that., i left it as it is., Quote:
gives lots of errors. RewriteCond !search.php gives 500 thanks for your time., |
||
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Too lazy to set a custom title
Industry Role:
Join Date: Aug 2002
Posts: 55,359
|
Quote:
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]
__________________
Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence. ![]() WP Stuff |
|
![]() |
![]() ![]() ![]() ![]() ![]() |