>_< .htaccess ARGH!!!!

Status
Not open for further replies.

shaistar

New Member
Messages
25
Reaction score
1
Points
0
I'm slightly (ok very, very, very) annoyed and frustrated with my .htaccess file. I'm trying to do seo rewrites on my dynamic urls for 4 friggin' days! (Deep Breath) For example,

www.example.co.cc/index.php(default displays ?page=home) to www.example.co.cc/random-phrase-here in my html it maps to <a href="/random-phrase-here">

www.example.co.cc/index.php?page=cookies to www.example.co.cc/cookies in my html it maps to <a href="/cookies">

www.example.co.cc/index.php?section=acategory&page=there-are-8 to
www.example.co.cc/random-phrase-here/acategory/there-are-8 in my html it maps to <a href="/random-phrase-here/category/there-are-8">

www.example.co.cc/index.php?section=letsgoto&page=place to www.example.co.cc/lets-go-somewhere/place in my html it maps to <a href="/lets-go-somewhere/place">

Here's a copy and paste of the all the crap I've tried from the internet and what is currently in my .htaccess commented:

#<IfModule mod_rewrite.c>
#Options +FollowSymLinks
#RewriteEngine On
#RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)/?$ index.php [QSA]
RewriteRule ^(.*)/?$ index.php?page=$1 [QSA,L]

# RewriteRule ^pattern/?$ substitution [optional flags]

RewriteRule ^(.+)$ /index.php?$1 [QSA,L]
#RewriteRule ^/(.*)$ /index.php [QSA]
#RewriteRule ^/(.*)/(.*)$ /index.php?page=$1 [QSA]
#RewriteRule ^/random-phrase-here/?$ /index.php [QSA,NC,L]
#RewriteRule ^/lets-go-somewhere/(.*)$ ?section=letsgoto&page=$1 [QSA,NC,L]
#RewriteRule ^(.*)/(.*)/?$ /index.php?section=$1&page=$2 [QSA,NC,L]
#RewriteRule ^(.*)/?$ index.php?page=$1 [NC,L]
#</IfModule>

*Sigh* and none of that crap works. Basically what I've got going is an index.php file that includes based on the get variable in the url. At one point in time I managed to get the url rewritten the only problem was the file that should of been included only brought up the default ?page=home page. If you need to see my php file I can do that it's just this post is getting lengthy, I just wanted to make sure you ( o, gracious helper person) had enough infor to help me out. Descalzo tried to help me but the code I was supplemented with didn't work or it did and I just don't know how to use it. I'm rambling. Thanks for your help in advance

-Shaistar
 
Last edited:

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Try
Code:
RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/cookies/*$ index.php?page=cookies [L,QSA]
RewriteRule ^/random-phrase-here/*$ index.php [L,QSA,NC]
RewriteRule ^/random-phrase-here/(.*)/(.*)$ index.php?section=$1&page=$2 [L,QSA,NC]
RewriteRule ^/lets-go-somewhere/(.*)$ index.php?section=letsgoto&page=$1 [L,QSA,NC]

Make sure that you are verifying the user input so that you aren't including arbitrary files as well.
 

shaistar

New Member
Messages
25
Reaction score
1
Points
0
404 Not Found on every link I click after I reload my site. Thanks. I appreciate your help.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
The 404 Not Found error is due to the maintenance going on right now on the Stoli server. See News&Announcements for more details and progress updates.
 

shaistar

New Member
Messages
25
Reaction score
1
Points
0
Ok then THANK YOU ♥HUG♥. (I think I might cry. The torture is over.) :)

---------- Post added at 11:28 PM ---------- Previous post was at 11:18 PM ----------

quick question, if I want to become illuminated could I actually pay the dollar a month or do I have to pay all at once?
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
You need to pay the $60 up front, which covers you for 5 years. There is currently no other payment option for Illuminated at this time.
 

Skizzerz

Contributors
Staff member
Contributors
Messages
2,928
Reaction score
118
Points
63
Can you be more specific? What isn't working?

To order illuminated, go to http://x10hosting.com/forums/payments.php, select 5 years/$60 from the Illuminated dropdown, hit Order, and follow through to pay via PayPal. Once ordered, you should receive an invoice and your forum group will be updated. A staff member will need to manually transfer you to the illuminated server, so please be patient with that.
 
Status
Not open for further replies.
Top