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 |
08-26-2022, 05:49 AM | #1 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
.htaccess rewrite issue
Can anyone who knows about .htaccess tell me why this is giving me a 500 error?
Its supposed to be re-writing the URLs so they are SEO friendly Quote:
When its in the /links/ directory it gives me an error when I click on one of the urls. When its in the domain root it wont even load the page before kicking out a 500 error. According to several Google results, this *should* be working perfectly |
|
08-26-2022, 06:30 AM | #2 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,217
|
That's all so wrong that I don't even know where to start, because I can't figure out what it is you are trying to do from looking at those 3 lines
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
08-26-2022, 07:21 AM | #3 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
It’s supposed to rewrite from link.php?id=XX
To /links/some-link-name There’s a ton of sites including Sitepoint threads that say this should work to achieve that. |
08-26-2022, 09:35 AM | #4 |
Confirmed User
Industry Role:
Join Date: Jun 2001
Location: Skype: ravo.fpctraffic
Posts: 5,427
|
I'm far from an .htaccess expert, but look at;
https://stackoverflow.com/questions/...o-friendly-url
__________________
AdultAdBroker - Buy and Sell Your Flat Rate Banners, Links, Tabs, Pops, Email Clicks and Members' Area Traffic - updated May 2024 |
08-26-2022, 09:51 AM | #5 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,217
|
Quote:
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ links.php?id=$1 [QSA,L]
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
08-26-2022, 11:07 AM | #6 | |
I'll make you famous
Industry Role:
Join Date: Oct 2002
Posts: 13,949
|
Quote:
Foe SEO friendly you would have .htacess that rewrites domain/links/link_name to domain/links.php?.... Not the other way around. . |
|
08-26-2022, 12:00 PM | #7 |
making it rain
Industry Role:
Join Date: Oct 2003
Location: seattle
Posts: 21,859
|
|
08-26-2022, 01:24 PM | #8 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
Quote:
That doesnt do anything when I put it in .htaccess, I was using that originally, then did a search for alternate ways to achieve what I wanted to happen :/ |
|
08-26-2022, 01:26 PM | #9 |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
I was always under the impression that turning link.php?id=XX to /links/link/-link-name-here/ was a much better option for SEO purposes?
|
08-26-2022, 01:27 PM | #10 | |
Confirmed User
Industry Role:
Join Date: Oct 2018
Location: New Orleans, Louisiana.
Posts: 773
|
Quote:
When editing the rewrite slightly, the most I could get it to do was /links/link/32 (link id number not the title of the link itself). It also just redirects to my 404 catchall pages content, not the link ids page content :/ |
|
08-29-2022, 11:47 AM | #11 | |
Confirmed User
Industry Role:
Join Date: Sep 2013
Location: The Netherlands
Posts: 805
|
Quote:
For example, just make "domain.com/links.php?id=big-boobies" redirect to "domain.com/links/link/big-boobies". You can skip the whole ID thing, you can get the matching ID number using the slug as well (just look it up from your database). Or make it work with both the slug and the ID number as query... then let your php code do the magic. If the GET parameter is an integer, connect to your database, find the matching slug first and then go ahead and force redirect to domain.com/links/rick-james-bitch...
__________________
Contact: email |
|