Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Requesting help with a .htaccess configuration

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Tue Oct 19, 2010 3:00 pm    Post subject: Requesting help with a .htaccess configuration Reply with quote

On how to rewrite URLs. I need the trail http://localhost/tam/ to internally direct to http://localhost/tam/public/ (so the contents of /tam/public/ are show when I go to /tam/). Does anybody have a clue as to how I go about doing this? I've been to http://httpd.apache.org/docs/2.0/misc/rewriteguide.html and attempted a few things, namely:

# In the /tam/.htaccess
Code:
RewriteEngine  on
RewriteBase    /tam/
RewriteRule    ^public$  public/  [R]

Fails, it does absolutely nothing.
Back to top
View user's profile Send private message
AhMunRa
Grandmaster Cheater Supreme
Reputation: 27

Joined: 06 Aug 2010
Posts: 1117

PostPosted: Tue Oct 19, 2010 4:05 pm    Post subject: Reply with quote

On your server
Code:
ls -l tam/

In particular I'm interested in the ownership of .htaccess. If you are root then the webserver which should be www-data may not be able to access it. This assumes Linux as the OS that the server is on.

Also if you are running the server on Windows, you need to make sure that you have the fully qualified path. C:/WHEREVER/tam/ otherwise it will fail, it isn't like Linux where you could specify ../tam/public/

PM me a bit of your httpd.conf and I'll take a look. Don't forget to take out the address if you like.

On another note this section should be in Web Development.

_________________
<Wiccaan> Bah that was supposed to say 'not saying its dead' lol. Fixing >.>
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8585
Location: 127.0.0.1

PostPosted: Tue Oct 19, 2010 4:21 pm    Post subject: Re: Requesting help with a .htaccess configuration Reply with quote

Augustine wrote:
On how to rewrite URLs. I need the trail http://localhost/tam/ to internally direct to http://localhost/tam/public/ (so the contents of /tam/public/ are show when I go to /tam/). Does anybody have a clue as to how I go about doing this? I've been to http://httpd.apache.org/docs/2.0/misc/rewriteguide.html and attempted a few things, namely:

# In the /tam/.htaccess
Code:
RewriteEngine  on
RewriteBase    /tam/
RewriteRule    ^public$  public/  [R]

Fails, it does absolutely nothing.


By default, Rewrite is not part of the access files. Make sure you have the extension loaded for your type of server.

Apache:
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

IIS (Windows):
http://www.micronovae.com/ModRewrite/ModRewrite.html

Then your file would be at:
http://localhost/tam/.htaccess

Something like this maybe:
Code:
RewriteEngine On
RewriteBase /tam/public
RewriteRule ^tam/(.*)$ /tam/public/$1


May need to change the rule though.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Aniblaze
Grandmaster Cheater Supreme
Reputation: 138

Joined: 23 Apr 2006
Posts: 1757
Location: The Netherlands

PostPosted: Thu Oct 28, 2010 10:57 am    Post subject: Reply with quote

I thank both of you kindly, it works now! I apologize for not posting it in the proper section, I must have overlooked it.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot 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
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites