modx htaccess links are not working - .htaccess

Hello MODx developers,
I am using MODx revolution. I have just transferred site from one domain to another. as it was a IP based server i have created virtual host with the same name it had previously.
On previous server the files were located at the root but in new server files are located at tab3, so i have created virtual host that points inside that directory. ie. I have all files in modx/ dir so my virtual host config set to /var/www/modx/
Now the problem is whenever i open home page as well as subdomains (contexts) it works and shows the page but when i open any internal links it says 404 page
Ex : if i open www.abc.com => It works
but when i open www.abc.com/contacts => It doesnt works
I see its issue with .htaccess because
1) if i remove htaccess
all the subdomains and domains works perfect but inner links like "abc.com/contact" doesnt open up and says 404
2) If i add it again only the main domain and its inner links open...no subdomain or inner links of subdomain works
One more thing....and CLUE is that
when i try to access the same 404 page with ID like this
www.abc.com/index.php?id=8056
It works
DO i need to add/remove something from htaccess ??

Is the new server running Apache? I had a similar problem where the server was running Zeus & therefore .htaccess didnt work. There is a solution but was too advanced for me. Was easier to install on an Apache server instead.

Related

How create symbol link for subdomain in IIS, which will open another domain running on IIS

I created a new site on IIS, for example mysite.com. Site is running, it is opened in browser, all good.
But I need create subdomain 1.mysite.com, which will open mysite.com. I don't mean a redirect. I mean open in browser 1.mysite.com and will be opening mysite.com
How can I do this on IIS?
Since you basically want two different names for your website
create a DNS entry for 1.mysite.com to point to mysite.com host entry
in IIS ,you can just add another binding with hostname 1.mysite.com

2 Different Servers - sub domain redirect url masking

I have gone through a lot of posts about .htaccess but its not working as my websites are on 2 different servers.
I have 2 websites, both are on different servers. One is on Linux Server and the other is on Windows Server.
My main website is hosted on the linux server. Lets call this abc.com
My other website is hosted on windows server - lets call this as xyz.com
I have created a sub domain on abc.com, subdomain.abc.com
I want to redirect subdomain.abc.com to xyz.com without changing the url which should remain as subdomain.abc.com. I have tried all sorts of combination in .htaccess but it does not work. Can you please help.
Thanks
VJ
Use an IFrame instead of trying to do this with htaccess files/code.
Using htaccess to redirect the page but keep the URL structure and change the domain only
Edit|Update: Use iframes and not frameset. See this w3schools tutorial page. Adding an iframe is very simple so keep everything very simple - http://www.w3schools.com/tags/tag_iframe.asp

Changing Outgoing Links via HtAccess but with exceptions

Hi there on my site i link to a site that has changed the url of the site but uses the original domain to host the images. Is this possible to catch the links via htaccess but no change any of that domain with an image file detected?
So change outgoing link from www.oldsite.com to www.newsite.com but if images detected leave oldsite.com url.
I have too many links to change manually, is this even possible ?
It can't be done using .htaccess . .htaccess is directory level Apache configuration file!

How to STOP redirecting my website to mobile.mywebsite.com in smartphones

I have developed a website www.mywebsite.com and it is ready to go live.
I have used Codeigniter framework.
When I enter www.mywebsite.com from any android/iphone, it redirects automatically to mobile.mywebsite.com and displays page not found error. I dont have any mobile site developed for this. I want to show the main site even on the smartphones.
I am not good at .htaccess file, and I am using default .htaccess to remove the index.php in the url.
I tried creating a subdomain mobile.mywebsite.com and pointed to root path. But same response. I search online, but didnt find anything on how to STOP redirecting.
Thanks in advance.
When I was uploading my local files into the server I was NOT overwriting the old ones assuming the folder is clean and no need to overwrite. But my hosting provider has default .htaccess which is redirecting to the mobile site.
I deleted the old one and gave my .htaccess without the mobile redirection and everything is in place now

Cakephp .htaccess : multiple domains pointing to one app

I am working on one cakePHP application.
Now i want to configure my main domain (www.example.com) to be accesses via 'www.xyz.com' or 'www.bcd.com'.
For this i will add the CName record in the 'www.xyz.com' or 'www.bcd.com' as 'www.example.com' then xys.com & bcd.com will point to the example.com.
But now on the xyz.com & bcd.com i can see the content of example.com, but whenever i click on any link it gives me 'URL NOT FOUND' Error.
So i tried lots of .htaccess rules but it is not working.
It is similar to the bloggers custom domain pointing. I need the same thing to be applied for my application.
Can anybody tried this before?
This isn't entirely an .htaccess issue - you need to first edit the server name in your web servers configuration file to serve not only example.com, but also requests coming in from xyz.com and bcd.com.

Resources