![]() |
![]() |
![]() |
||||
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 |
Guest
Posts: n/a
|
![]() On one of my sites I run WordPress and have permalinks setup via mod_rewrite. Currently, the posts appear as directories like
http://www.domain.com/category/postname/ I know I could change the permalink structure in the script itself to postname.html - but then the pages indexed by SEs would return 404s all across the site. Is there a way to divert requests for directories to the virtual .html files as specified by the new rewrite rules? ![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Guest
Posts: n/a
|
So
http://www.domain.com/category/postname/ would automatically 301 to http://www.domain.com/category/postname.html |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Too lazy to set a custom title
Join Date: Jun 2004
Location: Brasil
Posts: 15,778
|
I am sorry but I can help on this matter...good luck with it!
__________________
Do you need cheap, fast and reliable porn website hosting? Host Head is the way to go!! Asian Gay Special | Live on MSN - Live Webcam Chat | Live Adult Webcam Performances | MY SWEET BLACKS LIVE ON CAM Pukka Tranny | Tattooed Shemales | She's A He | Menu Porno | Porn Performances | All Chubby MY ICQ# 169833797 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 | |
Guest
Posts: n/a
|
Quote:
![]() |
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Join Date: Jun 2005
Location: Dutchie !!!
Posts: 2,119
|
Bump for you.
__________________
OMGWTFBBQ |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Confirmed User
Industry Role:
Join Date: Mar 2005
Location: elkektex at gmail
Posts: 1,813
|
try webmasterworld.com
They have a bunch of very knowledgeable people on the apache forum
__________________
exgfmovies.com, exgfclips.com, datesx.com, gayboards.com and more! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Dec 2004
Location: Vancouver
Posts: 4,325
|
I searched for this:
http://www.google.com/search?sourcei...q=htaccess+301 and found this: http://www.tamingthebeast.net/articl...1-redirect.htm |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
Haven't tested it, but something like:
Code:
RewriteEngine on RewriteRule categories/(.*)/? categories/$1.html [R=301]
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Confirmed User
Join Date: Apr 2003
Location: Loveland, CO
Posts: 5,526
|
Here's a handly little rewrite cheat sheet for you mod rewrite fans from some dude who apparently digs on jack daniels:
http://www.ilovejackdaniels.com/mod_...heat_sheet.png
__________________
Your post count means nothing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Too lazy to set a custom title
Join Date: Jun 2004
Location: Brasil
Posts: 15,778
|
Quote:
__________________
Do you need cheap, fast and reliable porn website hosting? Host Head is the way to go!! Asian Gay Special | Live on MSN - Live Webcam Chat | Live Adult Webcam Performances | MY SWEET BLACKS LIVE ON CAM Pukka Tranny | Tattooed Shemales | She's A He | Menu Porno | Porn Performances | All Chubby MY ICQ# 169833797 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
psili, that code won't work, because .* matches everything 0 or more times and /? matches a character 0 times or once... so this code of yours would match
http://www.domain.com/category/postname.html also Code:
RewriteEngine on RewriteRule $categories/([^/\.]+)/?^ categories/$1.html [R=301] This is not tested also, so maybe there are errors in this too ![]() Note that the above code will work in .htacces only, to use it in httpd.conf you should add / right before the categories, like this: Code:
RewriteEngine on RewriteRule $/categories/([^/\.]+)/?^ /categories/$1.html [R=301]
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
OU812
Join Date: Feb 2001
Location: California
Posts: 12,651
|
Quote:
tamingthebeast.net dam good one, explanes it the best I've ever seen. ![]()
__________________
Epic CashEpic Cash works for me Solar Cash Paysite Plugin Gallery of the day freesites,POTD,Gallery generator with free hosting |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Guest
Posts: n/a
|
thanks for the info guys. The example I posted was rather specific, the solution I need will be a little more complex since I am looking into redirecting URLs in different subfolders, not just /categories/. But nonetheless, I can start with the info that was posted here.
|
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Confirmed User
Join Date: Jun 2004
Posts: 689
|
Not a problem:
Code:
RewriteEngine on RewriteRule $(dir1|dir2|dir3|dir4)/([^/\.]+)/?^ $1/$2.html [R=301]
__________________
Webmasters! Looking for new affiliate programs to promote? Affiliate Program Search <-- Search for programs with FHGs, RSS feed, specific niche sponsors, ... |
![]() |
![]() ![]() ![]() ![]() ![]() |