Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Reply
RewriteRule help, please!
Old 12-29-2006, 09:13 PM RewriteRule help, please!
Junior Talker

Posts: 1
Trades: 0
Hello, this is my first post here, and I apologize for it being a request for help.

If anyone has a moment, could they please look at this and tell me why it isn't working?

Ok, heres my situation:

I run a myspace helpsite that has layouts, graphics, ect. I purchased a content management system awhile back that uses .htaccess to make it so things in the public_html/apps folder, appear to be in the public_html itself.

IE: While the folder test is in public_html/apps/test, visitors see it just as www.site.com/test.

I added 2 folders to both the apps folder, and the public_html and tried adding the lines to the .htaccess file to make it so my visitors can visit the page, when they go their alot of the time it just takes them back to my index page, but sometimes it actually takes them to the correct directory, this I do not get why.

My .htaccess is as follows

Code:
ErrorDocument 404 /index.php

RewriteEngine On
RewriteRule ^contact-tables$  index.php?app=contact-tables [L]
RewriteRule ^contact-tables/([0-9]+)  index.php?app=contact-tables&pageNum=$1 [L]
RewriteRule ^contact-tables/large/([0-9]+)$  index.php?app=contact-tables&action=large&id=$1 [L]
RewriteRule ^contact-tables/generate$  index.php?app=contact-tables&action=generate [L]

RewriteRule ^myspace-backgrounds$  index.php?app=myspace-backgrounds [L]
RewriteRule ^myspace-backgrounds/([0-9]+)  index.php?app=myspace-backgrounds&pageNum=$1 [L]
RewriteRule ^preview-background/(.*)  index.php?app=myspace-backgrounds&action=preview&bg=$1 [L]

RewriteRule ^myspace-animations$  index.php?app=myspace-animations [L]
RewriteRule ^myspace-animations/([0-9]+)  index.php?app=myspace-animations&pageNum=$1 [L]
RewriteRule ^viewimage/(.*)  index.php?app=myspace-animations&action=viewimage&bg=$1 [L]

RewriteRule ^myspace-cartoons$  index.php?app=myspace-cartoons [L]
RewriteRule ^myspace-cartoons/([0-9]+)  index.php?app=myspace-cartoons&pageNum=$1 [L]

RewriteRule ^extended-network$  index.php?app=extended-network [L]
RewriteRule ^extended-network/([0-9]+)  index.php?app=extended-network&pageNum=$1 [L]
RewriteRule ^extended-network-large/([0-9]+)  index.php?app=extended-network&action=large&id=$1 [L]
RewriteRule ^extended-network-gen$  index.php?app=extended-network-gen [L]

RewriteRule ^myspace-glitter-graphics$  index.php?app=myspace-glitter-graphics [L]
RewriteRule ^myspace-glitter-graphics/([0-9]+)  index.php?app=myspace-glitter-graphics&pageNum=$1 [L]

RewriteRule ^myspace-glitter-words$  index.php?app=myspace-glitter-words [L]
RewriteRule ^myspace-glitter-words/([0-9]+)  index.php?app=myspace-glitter-words&pageNum=$1 [L]

RewriteRule ^myspace-icons$  index.php?app=myspace-icons [L]
RewriteRule ^myspace-icons/([0-9]+)  index.php?app=myspace-icons&pageNum=$1 [L]

RewriteRule ^online-now-icons$  index.php?app=online-now-icons [L]
RewriteRule ^online-now-icons/([0-9]+)  index.php?app=online-now-icons&pageNum=$1 [L]

RewriteRule ^myspace-words$  index.php?app=myspace-words [L]
RewriteRule ^myspace-words/([0-9]+)  index.php?app=myspace-words&pageNum=$1 [L]

RewriteRule ^myspace-graphics$  index.php?app=myspace-graphics [L]

RewriteRule ^myspace-air-force-1$  index.php?app=myspace-air-force-1 [L]
RewriteRule ^myspace-air-force-1/([0-9]+)  index.php?app=myspace-air-force-1&pageNum=$1 [L]

RewriteRule ^myspace-days$  index.php?app=myspace-days [L]
RewriteRule ^myspace-days/([0-9]+)  index.php?app=myspace-days&pageNum=$1 [L]

RewriteRule ^myspace-dividers$  index.php?app=myspace-dividers [L]
RewriteRule ^myspace-dividers/([0-9]+)  index.php?app=myspace-dividers&pageNum=$1 [L]

RewriteRule ^funny_pictures$  index.php?app=funny_pictures [L]
RewriteRule ^funny_pictures/([0-9]+)  index.php?app=funny_pictures&pageNum=$1 [L]

RewriteRule ^myspace-happy-holiday$  index.php?app=myspace-happy-holiday [L]
RewriteRule ^myspace-happy-holiday/([0-9]+)  index.php?app=myspace-happy-holiday&pageNum=$1 [L]

RewriteRule ^myspace-misc$  index.php?app=myspace-misc [L]
RewriteRule ^myspace-misc/([0-9]+)  index.php?app=myspace-misc&pageNum=$1 [L]

RewriteRule ^myspace-mlb$  index.php?app=myspace-mlb [L]
RewriteRule ^myspace-mlb/([0-9]+)  index.php?app=myspace-mlb&pageNum=$1 [L]

RewriteRule ^myspace-movies$  index.php?app=myspace-movies [L]
RewriteRule ^myspace-movies/([0-9]+)  index.php?app=myspace-movies&pageNum=$1 [L]

RewriteRule ^myspace-names$  index.php?app=myspace-names [L]
RewriteRule ^myspace-names/([0-9]+)  index.php?app=myspace-names&pageNum=$1 [L]

RewriteRule ^myspace-nba$  index.php?app=myspace-nba [L]
RewriteRule ^myspace-nba/([0-9]+)  index.php?app=myspace-nba&pageNum=$1 [L]

RewriteRule ^myspace-nhl$  index.php?app=myspace-nhl [L]
RewriteRule ^myspace-nhl/([0-9]+)  index.php?app=myspace-nhl&pageNum=$1 [L]

RewriteRule ^myspace-pimps$  index.php?app=myspace-pimps [L]
RewriteRule ^myspace-pimps/([0-9]+)  index.php?app=myspace-pimps&pageNum=$1 [L]

RewriteRule ^myspace-sexy-dolls$  index.php?app=myspace-sexy-dolls [L]
RewriteRule ^myspace-sexy-dolls/([0-9]+)  index.php?app=myspace-sexy-dolls&pageNum=$1 [L]

RewriteRule ^myspace-shoes$  index.php?app=myspace-shoes [L]
RewriteRule ^myspace-shoes/([0-9]+)  index.php?app=myspace-shoes&pageNum=$1 [L]

RewriteRule ^myspace-smilies$  index.php?app=myspace-smilies [L]
RewriteRule ^myspace-smilies/([0-9]+)  index.php?app=myspace-smilies&pageNum=$1 [L]

RewriteRule ^myspace-sports$  index.php?app=myspace-sports [L]
RewriteRule ^myspace-sports/([0-9]+)  index.php?app=myspace-sports&pageNum=$1 [L]

RewriteRule ^myspace-welcome-signs$  index.php?app=myspace-welcome-signs [L]
RewriteRule ^myspace-welcome-signs/([0-9]+)  index.php?app=myspace-welcome-signs&pageNum=$1 [L]

RewriteRule ^myspace-codes$  index.php?app=myspace-codes [L]
RewriteRule ^myspace-codes-center-profile$  index.php?app=myspace-codes-center-profile [L]
RewriteRule ^myspace-codes-hide-about-me$  index.php?app=myspace-codes-hide-about-me [L]
RewriteRule ^myspace-codes-hide-extended-network$  index.php?app=myspace-codes-hide-extended-network [L]
RewriteRule ^myspace-codes-hide-contact-box$  index.php?app=myspace-codes-hide-contact-box [L]
RewriteRule ^myspace-codes-hide-comments$  index.php?app=myspace-codes-hide-comments [L]
RewriteRule ^myspace-codes-hide-details-section$  index.php?app=myspace-codes-hide-details-section [L]
RewriteRule ^myspace-codes-hide-friends$  index.php?app=myspace-codes-hide-friends [L]
RewriteRule ^myspace-codes-hide-general-info$  index.php?app=myspace-codes-hide-general-info [L]
RewriteRule ^myspace-codes-hide-last-login$  index.php?app=myspace-codes-hide-last-login [L]
RewriteRule ^myspace-codes-hide-search-form$  index.php?app=myspace-codes-hide-search-form [L]
RewriteRule ^myspace-codes-hide-url-box$  index.php?app=myspace-codes-hide-url-box [L]
RewriteRule ^myspace-codes-scrolling-friends-comments$  index.php?app=myspace-codes-scrolling-friends-comments [L]
RewriteRule ^myspace-codes-tables-switch-sides$  index.php?app=myspace-codes-tables-switch-sides [L]
RewriteRule ^myspace-codes-hover-link-sparkles$  index.php?app=myspace-codes-hover-link-sparkles [L]
RewriteRule ^myspace-codes-lower-case-links$  index.php?app=myspace-codes-lower-case-links [L]
RewriteRule ^myspace-codes-remove-addcomment-link$  index.php?app=myspace-codes-remove-addcomment-link [L]
RewriteRule ^myspace-codes-special-characters$  index.php?app=myspace-codes-special-characters [L]
RewriteRule ^myspace-codes-resize-comment-images$  index.php?app=myspace-codes-resize-comment-images [L]

RewriteRule ^myspace-generators$  index.php?app=myspace-generators [L]
RewriteRule ^falling-objects$  index.php?app=falling-objects [L]
RewriteRule ^nav-bar-generator$  index.php?app=nav-bar-generator [L]
RewriteRule ^overlapping-text-generator$  index.php?app=overlapping-text-generator [L]
RewriteRule ^comment-box-gen$  index.php?app=comment-box-gen [L]
RewriteRule ^color-code-picker$  index.php?app=color-code-picker [L]
RewriteRule ^auto-bulletin-repost-button$  index.php?app=auto-bulletin-repost-button [L]
RewriteRule ^video-code-gen$  index.php?app=video-code-gen [L]
RewriteRule ^song-code-gen$  index.php?app=song-code-gen [L]
RewriteRule ^auto-comment-generator$  index.php?app=auto-comment-generator [L]
RewriteRule ^whore-me-generator$  index.php?app=whore-me-generator [L]
RewriteRule ^friends$  index.php?app=friends [L]
RewriteRule ^friendscode$  index.php?app=friends&action=friendscode [L]
RewriteRule ^friendspicurl$  index.php?app=friends&action=friendspicurl [L]
RewriteRule ^flashmp3player$  index.php?app=flashmp3player [L]
RewriteRule ^flashmp3player-code$  index.php?app=flashmp3player&action=flashmp3player-code [L]
RewriteRule ^glitter-text-generator$  index.php?app=glitter-text-generator [L]
RewriteRule ^glitter-word-gen-1$  index.php?app=glitter-text-generator&action=glitter-word-gen-1 [L]
RewriteRule ^glitter-word-gen-2$  index.php?app=glitter-text-generator&action=glitter-word-gen-2 [L]
RewriteRule ^myspace-editor$  index.php?app=myspace-editor [L]
RewriteRule ^myspace-editor-preview$  index.php?app=myspace-editor&action=preview [L]
RewriteRule ^train$  index.php?app=train [L]
RewriteRule ^trainadd$  index.php?app=train&action=add [L]

RewriteRule ^upload$  index.php?app=upload [L]
RewriteRule ^uploadpop$  index.php?app=upload&action=uploadpop [L]

RewriteRule ^myspace-tutorials$  index.php?app=myspace-tutorials [L]

RewriteRule ^myspace-layouts$  index.php?app=myspace-layouts [L]
RewriteRule ^myspace-layouts/([0-9]+)$  index.php?app=myspace-layouts&cat_id=$1 [L]
RewriteRule ^myspace-layouts/([0-9]+)/page/([0-9]+)  index.php?app=myspace-layouts&cat_id=$1&pageNum=$2 [L]
RewriteRule ^myspace-layouts/viewimage/([0-9]+)  index.php?app=myspace-layouts&action=codes&id=$1 [L]
RewriteRule ^myspace-layouts/preview/([0-9]+)  index.php?app=myspace-layouts&action=preview&id=$1 [L]

RewriteRule ^admin$  index.php?app=admin [L]
RewriteRule ^vip$  index.php?app=vip [L]
RewriteRule ^tracker$  index.php?app=tracker [L]
The last 2 lines are the ones I added, but I do not see why this isn't working, could someone possibly type out what is needed, if i just want my directories to show up as www.site.com/vip , but have the files coming from public_html/apps/vip ?

If anyone can help me I'd greatly appreciate it, I've been stumped for the past few days, it seems simple enough, but I just cannot figure it out Thank you.
Daniel05 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-30-2006, 01:20 AM Re: RewriteRule help, please!
smarty's Avatar
Ultra Talker

Posts: 413
Name: Vinod Rawat
Location: india
Trades: 1
where is your .htaccess located
i guess i should be in yoursite.com/apps/vip/.htaccess
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
smarty is offline
Reply With Quote
View Public Profile Visit smarty's homepage!
 
Reply     « Reply to RewriteRule help, please!
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.16346 seconds with 12 queries