Welcome to HostingForumz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

.htaccess and Rewrite...

 
   Web Hosting Problem Solving Community! (Home) -> Apache RSS
Next:  am I running as root? sperl problems  
Author Message
Xao

External


Since: Feb 20, 2008
Posts: 1



(Msg. 1) Posted: Wed Feb 20, 2008 11:15 am
Post subject: .htaccess and Rewrite...
Archived from groups: alt>apache>configuration (more info?)

I'm trying to give a permanent redirect for a directory that I moved
the path to and I'm having trouble figuring it out.

Old:
http://forum.server1.com/general/

New:
http://forum.server1.com/general-new-subject/

Any assistance would be greatful....

I want it marked as a permanent redirect too, for Google.

Thanks!

 >> Stay informed about: .htaccess and Rewrite... 
Back to top
Login to vote
Kees Nuyt

External


Since: Oct 25, 2006
Posts: 78



(Msg. 2) Posted: Wed Feb 20, 2008 10:07 pm
Post subject: Re: .htaccess and Rewrite... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Wed, 20 Feb 2008 11:15:20 -0800 (PST), Xao
wrote:

>I'm trying to give a permanent redirect for a directory that I moved
>the path to and I'm having trouble figuring it out.
>
>Old:
>http://forum.server1.com/general/
>
>New:
>http://forum.server1.com/general-new-subject/
>
>Any assistance would be greatful....
>
>I want it marked as a permanent redirect too, for Google.
>
>Thanks!

It's not a
Use alias.
alias /general ..somedir../general-new-subject
<directory ..somedir../general-new-subject>
directives...
::
</directory>

...somedir.. doesn't have to be in your DocumentRoot.
--
( Kees
)
c[_] This sentence contradicts itself -- no actually it doesn't.
(Hofstadter) (#496)

 >> Stay informed about: .htaccess and Rewrite... 
Back to top
Login to vote
D. Stussy

External


Since: Nov 01, 2007
Posts: 25



(Msg. 3) Posted: Wed Feb 20, 2008 10:07 pm
Post subject: Re: .htaccess and Rewrite... [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Kees Nuyt" wrote in message

> On Wed, 20 Feb 2008 11:15:20 -0800 (PST), Xao
> wrote:
>
> >I'm trying to give a permanent redirect for a directory that I moved
> >the path to and I'm having trouble figuring it out.
> >
> >Old:
> >http://forum.server1.com/general/
> >
> >New:
> >http://forum.server1.com/general-new-subject/
> >
> >Any assistance would be greatful....
> >
> >I want it marked as a permanent redirect too, for Google.
> >
> >Thanks!
>
> It's not a
> Use alias.
> alias /general ..somedir../general-new-subject
> <directory ..somedir../general-new-subject>
> directives...
> ::
> </directory>
>
> ..somedir.. doesn't have to be in your DocumentRoot.

Alias won't change the URL requesting the document. Redirect 301 /a/ /b/
will (cause a->b).
 >> Stay informed about: .htaccess and Rewrite... 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
.htaccess rewrite - Hello. I'm trying to redirect all requests from http://domain1.com/* to http://domain2.com/* I have the following in my .htaccess file in the doc root of domain1.com: RewriteEngine on RewriteCond %{REQUEST_URI} !-U RewriteRule ^(.+) ..

Need help with .htaccess rewrite - Hiyee I've been googling for a whole day now and can't find a decent example/guide/howto on the various variables, and functions available for Rewriting and Redirecting using only a .htaccess file. I have one host with multiple domain names (it's..

Rewrite with .htaccess, php on linux - I am trying to achieve this solution of having pages served statically by the web server. The URL rewriting is occuring, but I can't get the server to output the file as an .html page. Is there something similar in .php to force the output of the query t...

rewrite conditions in .htaccess - Hi there, I am wondering how to write a condition which is true for http and https I tryed to replace the s with *, but this did not work as expected. Have a look: RewriteCond %{HTTP_REFERER} !^http*://www.servername.*$ [NC] Is there a special..

htaccess rewrite question - What would be the htaccess syntax to redirect requests as such? Request http://personalweb.example.com/~user Rewrite to http://personalweb.example.com/user/ Basically just removing the tilde. Thanks
   Web Hosting Problem Solving Community! (Home) -> Apache All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]