Forum Moderators: phranque

Message Too Old, No Replies

Subdomain htaccess

         

esprague

4:22 pm on Apr 25, 2006 (gmt 0)

10+ Year Member



This works in the .htaccess file of our root directory when we have the programname file in our root directory:
RewriteRule ^(SEO-Name)-(.*).html$ programname.php?c=$2

When we copy the programname file to one of our subdomains and this same code to the .htaccess file of the subdomain it does not work.

Does anyone know what we need to do differently?

Thanks,
Eric

esprague

11:10 pm on Apr 25, 2006 (gmt 0)

10+ Year Member



Perhaps copying this entry from the .htaccess file in the root directory to the .htaccess in the subdomain is the wrong approach.

If it is easier to just modify this entry in the root directory .htaccess file then we can do that. I'm just not sure of how to change it so that it looks at files in the subdomain instead of the root dir.

jdMorgan

12:19 am on Apr 26, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are mixing two incompatible terminologies here, "subdomains" and "files".

Domains cease to exist at the boundary between the Web and your server's filesysystem. After the config file is processed and the server passes a request into the filesystem, domains and subdomains cease to have any meaning. And that may be a clue here.

You might try 'rooting' your substitution path like this:

RewriteRule ^(SEO-Name)-(.*).html$ /sudomain-subdirectory-path/programname.php?c=$2 [L]

or look into using the RewriteBase directive.

I can't offer much more detail, because
> it does not work
doesn't really tell us much.

If you got an error, examine your server error log and server access log; they may tell you what is wrong.

Jim

esprague

5:15 pm on Apr 26, 2006 (gmt 0)

10+ Year Member



Jim,

I appreciate your help. I'll do more research and post more specifics.

Thanks Again,
Eric

esprague

10:48 pm on Apr 26, 2006 (gmt 0)

10+ Year Member



We decided to just keep the mod rewrite in the root directory and not have these links in the subdomain.

Thanks for your help, sooner or later we'll be doing this sort of thing in the subdomains so I appreciate the feedback.