Webmaster Forum


Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Coding Forum Problems with your code? Let's hear about it.

Easy Date   Improve your ranking, submit to directories   V7N Directory

Reply
 
LinkBack Thread Tools Display Modes
Old 07-21-2006, 12:01 AM   #1 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
.htaccess redirect problem..!

I need to redirect via fake subomains on a website using mod_rewrite however its not working properly which is likely because I dont know what im doing.

Its a wordpress blog so if you know about wordpress you will recognise the %xxx% bits below.

http:%category%.mydomain.com/%author%/%postname%/

That is how I would like it to appear but its not working.

At the moment I have it setup as:

/%category%/%author%/%postname%/

and the .htaccess file read as follows.


# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress



Any help appreciated...
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Sponsored Links
SEO Hosting by HostGator  Advertise Here  Buy Blog Links
Old 07-26-2006, 10:09 AM   #2 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
Hi,

your hosting may not have enabled mod_rewrite apache module for customers.

Svet
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-28-2006, 01:48 PM   #3 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Its my server, it is installed as it is currently working however I am not savvy enough with htaccess to get it working.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-29-2006, 01:06 PM   #4 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
hi,

put the code you're showing here in an .htaccess where your wordpress installed.

if your web server is apache2 you may prefix RewriteBase / with "#"

post latest errors from apache log file using "tail" command.

as I understand mod_rewrite rules, all requests will be passed through index php if such file does not exist.

you need also to set up a catch-all dns to handle all requests to your subdomains
or create each subdomain when creating a new category.

Svet
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-29-2006, 01:46 PM   #5 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
The one above is what im using at the moment, it works just I need it changing so it shows as a subdomain.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-30-2006, 02:13 PM   #6 (permalink)
Contributing Member
 
lordspace's Avatar
 
Join Date: 05-30-06
Location: Canada
Posts: 458
iTrader: 0 / 0%
lordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nicelordspace is just really nice
Send a message via ICQ to lordspace Send a message via Skype™ to lordspace
Hi,

I am not familiar with this blog yet, but I think you should check the bog's configuration and setup respective subdomains.

Svet
lordspace is offline  
Add Post to del.icio.us
Reply With Quote
Old 07-31-2006, 06:46 AM   #7 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
Immo,
Instead of mucking around with the .htaccess, just update your 'permalink structure' in your Wordpress admin area by clicking Options.. then permalink options. And put in mydomain.com in the structure there. Have you tried that?
I used that a few days ago to put a .html at the end of all blog posts in my blog, and it worked fine.

Last edited by ali_420 : 07-31-2006 at 06:51 AM.
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 09:39 AM   #8 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
I tried mucking around with the control panel but it wont do it, ive got to get htaccess to work somehow... Either that or I just modify the code manually but that takes time...

Ill figure something out.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 09:42 AM   #9 (permalink)
Southern Brat
 
Cricket's Avatar
 
Join Date: 10-13-03
Location: Texas
Posts: 15,700
iTrader: 0 / 0%
Cricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster materialCricket is supreme webmaster material
Do you have permissions set high enough on the .htaccess file to allow the control panel to make the changes for you?
__________________
GNC Web Creations - Free Search Engine Optimization Training Class
Website Development Training - Website Development Training Blog

What are you waiting for? Submit your site to directory.v7n.com today!
Cricket is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 09:53 AM   #10 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Yes but it doesnt work, it makes the link appear like this:

http://http://category.domain.ext/folder/subfolder/

I just need to find a way to get it working but I guess I am going to have to hard code it and rewrite the PHP. Shouldnt take long I was just hoping there was an easier way.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 10:13 AM   #11 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
Immo,
I think you need to chmod the .htaccess to 777 and then try to update the permalink structure in wordpress. After you update it you can always chmod .htaccess back to whatever you need.

Give it a shot and get back to me
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 10:15 AM   #12 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
edit: double post

Last edited by ali_420 : 08-01-2006 at 10:31 AM.
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 10:24 AM   #13 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
No that doesnt work, when you change it in wordpress it does the links as I posted above, if needs to be done manually, wordpress cant do it.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 04:34 PM   #14 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
Hey Immo,
In that case, why don't you just add the subdomains manually and point them to the www.yoursite/blog/category/? Isn't that possible?
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-01-2006, 11:37 PM   #15 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
That would defeat the object of having subdomains, I want everything categorised by subdomain not subfolder.

This is going to be a painful process getting it to work, I can see it now
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-02-2006, 12:41 AM   #16 (permalink)
Inactive
 
ali_420's Avatar
 
Join Date: 06-16-06
Posts: 268
iTrader: 0 / 0%
Latest Blog:
None

ali_420 is on the right pathali_420 is on the right pathali_420 is on the right path
Immo,
I'd say go to sitepoint.com and post this in the PHP forums out there. You're certain to find out whats the problem over there. I don't do work with regexps/mod_rewrite so I can't tell you how to fix this, but there are my coders over there who can.
ali_420 is offline  
Add Post to del.icio.us
Reply With Quote
Old 08-03-2006, 04:02 AM   #17 (permalink)
Potato Monster
 
Immo's Avatar
 
Join Date: 03-26-04
Location: Chester, England
Posts: 3,869
iTrader: 0 / 0%
Immo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest orderImmo is a web professional of the highest order
Send a message via ICQ to Immo Send a message via AIM to Immo Send a message via MSN to Immo Send a message via Yahoo to Immo Send a message via Skype™ to Immo
Ill figure it out, there are a few people here who can help. I would rather figure it out that someone hand the answer to me on a plate, at least then I will remember for next time.

Thanks for trying to help though.
__________________
I have become death, destroyer of worlds.
Immo is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Web Design Lobby > Coding Forum

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
.htaccess 301 redirect modine Coding Forum 14 06-12-2007 11:28 AM
htaccess 301 redirect esiason14 Coding Forum 2 01-31-2007 12:44 PM
.htaccess redirect question Pimpen 2010 Coding Forum 4 04-04-2006 10:34 AM
htaccess/mod rewrite help to redirect subdomain to a domain Thanol Coding Forum 0 07-19-2004 09:36 AM
.htaccess redirect to new webspace luchtzak Coding Forum 7 01-25-2004 09:56 AM


Sponsor Links
Get exposure! Get exposure! Find Scripts Web Hosting Directory Get exposure! SEO Blog