Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can !
Moderator: General Moderators
intellivision
Forum Commoner
Posts: 83 Joined: Mon Aug 22, 2005 1:25 am
Location: Orbit
Post
by intellivision » Tue Jan 23, 2007 10:55 pm
I'm getting 404's on
http://www.appleswitcher.com/blog/
How to rewrite those requests to go to
http://www.appleswitcher.com/ ?
And likewise
http://www.appleswitcher.com/blog/feed/ to feed://http//
www.appleswitcher.com/feed/ ?
Here's my .htaccess currently:
Code: Select all
RewriteEngine On
# BEGIN stats passthru
RewriteBase /
RewriteCond %{REQUEST_URI} ^/stats/(.*)$ [OR]
RewriteCond %{REQUEST_URI} ^/failed_auth.html$
RewriteRule ^.*$ - [L]
# END stats passthru
<IfModule mod_rewrite.c>
RewriteEngine On
# BEGIN product_reviews
RewriteBase /
RewriteCond product_reviews/%{QUERY_STRING} submission=true
RewriteRule product_reviews/mode/([0-9]+)/id/([0-9]+)(/)?$ product_reviews.php?mode=$1&id=$2&flag=2 [L]
RewriteRule product_reviews/mode/([0-9]+)/id/([0-9]+)(/)?$ product_reviews.php?mode=$1&id=$2&flag=1 [L]
# END product_reviews
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I tried to do something like
Code: Select all
# BEGIN /blog/ fix attempt
RewriteRule /^blog/$ /index.php [L]
to no avail. I suck at mod_rewrite.[/quote]
intellivision
Forum Commoner
Posts: 83 Joined: Mon Aug 22, 2005 1:25 am
Location: Orbit
Post
by intellivision » Wed Jan 24, 2007 5:57 pm
Thanks KH and dude81 for your help.
K, your's doesn't work.
Dude, I read that tutorial and even
another but I still can't get it to work.
I tried the very simple
Code: Select all
RewriteBase /
RewriteRule ^blog/ / [L]
and the more complex
Code: Select all
RewriteBase /
RewriteCond %{REQUEST_URI} ^blog/(.*)$
RewriteRule /$ - [L]
But those still don't rewrite
http://www.appleswitcher.com/blog/
Do I need to make an exception to the rules that are already there, instead of another rule?
I'm just not getting anywhere. Could you point me in the right direction?
Thanks,
Confused
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Wed Jan 24, 2007 10:16 pm
What is the blog software you are using, if it is wordpress
, then you need not do anything on rewrite rules.
intellivision
Forum Commoner
Posts: 83 Joined: Mon Aug 22, 2005 1:25 am
Location: Orbit
Post
by intellivision » Thu Jan 25, 2007 2:47 pm
Yes, WordPress.
My install directory is /blog, but the application writes its own mod_rewrite rules (above, between the "#wordpress" comments) to appear at the root. I configured it this way through the admin panel so as not to clutter the root level with WP files.
So the current rules are working. Except for requests for files in appleswitcher.com/blog, which trigger a 404. It's weird.
That's why I don't know if
a) it should work as is, and something else is messed up or
b) I should add a rule or
c) I should modify an existing rule
thx for the help here.
dude81
Forum Regular
Posts: 509 Joined: Mon Aug 29, 2005 6:26 am
Location: Pearls City
Post
by dude81 » Mon Jan 29, 2007 12:14 am
I Hope Im not too late,
But still not through with your question properly, sorry for my english,
You mean to say
appleswitcher.com should point to your blog and
appleswitcher.com/blog/ also should point to blog.
If that is the case, I think you need to add a rewrite rule in classes wp_rewrite.