![]() |
![]() |
![]() |
||||
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
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
mod url rewrite expert needed
any mod rewrite experts on here? I'm trying to rewrite domain.com/view/USER.html to domain.com/USER and with trailing / this is the example I've been messing with RewriteRule ^/view\/(.*).html$ $1 [R] but no luck at getting it to work. below is my current rewrite
thanks in advance. Code:
<IfModule mod_rewrite.c> RewriteEngine On RewriteBase / # force www RewriteCond %{HTTP_HOST} !^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] # end www # start underscore -> dash conversion RewriteRule !\.(html|php)$ - [S=4] RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=uscor:Yes] RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=uscor:Yes] RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=uscor:Yes] RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=uscor:Yes] RewriteCond %{ENV:uscor} ^Yes$ RewriteRule (.*) http://www.domain.com/$1 [R=301,L] # end underscore RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*) index.php [L] </IfModule> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Feb 2008
Location: South of the border
Posts: 1,682
|
Try this
![]() Code:
RewriteEngine On RewriteRule ^([^/]*)/$ /view/$1.html [L]
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
ICQ: 197-556-237
Join Date: Jun 2003
Location: BRASIL !!!
Posts: 57,559
|
What the...?
__________________
I'm just a newbie. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Join Date: Oct 2003
Location: Atlanta
Posts: 2,840
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
The Dirty Frenchman
Industry Role:
Join Date: Nov 2005
Location: Lost Angeles
Posts: 8,904
|
Options +FollowSymLinks
RewriteEngine on RewriteRule ^/view/(.*).html /$1 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
The one and only!
Industry Role:
Join Date: Nov 2002
Location: Atlanta, GA
Posts: 17,761
|
u work too hard man
![]()
__________________
Mandy's Playhouse Her First Fat Girl If you're interested in promoting my sites, ICQ me! 178411921 |
![]() |
![]() ![]() ![]() ![]() ![]() |