Prestashop : url rewrite not working - php

PhpInfo shows that the Apache Rewrite module is activated.
In the backoffice the simplified URLS option is activated.
But still urls are in the form of index.php?q=user
What could be other possible reasons for this?

Make sure the webserver are write permission on Prestashop installation directory. I fit do not, it will not be able to write down the .htaccess file.

Related

Web project installation on IIS

I would like to share with my project and get your opinions. I developed the project which needs to be launched through IIS. The problem is with linking to other pages. In fact, I partially managed to solve the problem, but so far by 30%. Authorization to the index.php main page is successful, but when you go to all other pages (for example, the "List of applications" page), error 404 appears.I send screenshots of the project. I can’t figure out why such an error comes out, I will be glad to hear your offers.
To resolve this issue try to follow some below steps:
1)make sure you installed php in iis.
2)Select site in ii manager and select directory browsing feature and enable it from the action pane.
3)after enabling it select site again and right-click on it and select Explore option and check that you are looking for file or folder is available or not.
and if you have .htaccess file and rewrite rules in it than install URL rewrite module in iis and import the .htaccess file in iis URL rewrite.
4) make sure that your site folder has iis_iusr and iusr permission.
To import the .htaccess file in iis:
1)Select site in iis.
2) select url rewrite module.
3)select import rule from the action pane.
4)Copy-paste your .htaccess file or select it under “rewrite rules” or select .htaccess file from “Configuration file”.

Symfony4 web.config for IIS on azure

I've deployed a symfony4 project on Azure, it uses IIS so .htaccess doesn't work. I've set the root folder on Azure app settings to "site\wwwroot\testproject\public" that folder contains index.php. I've tryed differents web.config without results.
If I open the app url it says: "The resource you are looking for has been removed, had its name changed, or is temporarily unavailable."
but if I open the url appending /index.php it shows the content. I need a rewrite rule like symfony/apache-pack gives for apache but for IIS.
Thanks a lit
There is an extensive article on learn.microsoft.com on converting .htaccess to web.config: https://learn.microsoft.com/en-us/iis/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig
I won't paste the contents here since it is very extensive and I don't use Windows and you may have custom .htaccess rules.
I suggest you to identify all .htaccess config files on your install and convert them.

Silverstripe not working on Plesk Server

I am trying to create a new domain which runs on SilverStripe 3.0. I am unable to figure out the issue. If I upload a custom php page then it runs fine, but my website is not working. It shows blank page but shows the favico.
If I try to open up www.mydomain.com/admin/, I get the error
Page Not Found
The requested URL /admin/pages was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
This is not a Silverstripe error page. Here is my php info Info
Please let me know if I am missing something or there is any way to figure out the issue.
Try www.yourdomain.com/index.php/admin
If that works then it is because your rewrites are not working. This can be because .htaccess isn't configured properly, or because .htaccess is not used at all (in which case you need to edit your server config).
Last I used Plesk it always used apache. If that is different now and you're using nginx as more than a forward proxy, then you will need to set up the redirects for your site manually.
It does sound like your .htaccess is not being respected. Does Plesk allow overrides for .htaccess in the local directory?
At an apache level we would have something like this stanza to ensure the the .htaccess of the project was respected;
AllowOverride All
If your .htaccess is being processed, make sure that your host has mod_rewrite enabled as that is required to access to pretty URLS.

Rewriting URLs in Joomla Component

I have a trouble in mod_rewrite redirect. I want to create friendly SEO links for my component. Now linkk looks like that:
http://www.mytestsite.com/index.php?option=com_mycomponent&task=show_posts&evid=11&Itemid=200&year=2013&month=10&day=15&title=this-is-really-test-article-here&uid=43840300d283724e77d5f33f19780f36&catids=15|16|17|18&filter_reset=1
I want to have:
http://www.mytestsite.com/posts/200-this-is-really-test-article-here
where first part of URL is itemid (200), and after article title.
How can i do that?
In Joomla, this is done in the administrator control panel by editing the site configuration (Site...Global Configuration). Click on the SEO tab and check the desired options, save and you're done.
If you need more options, try installing an SEO extension
Do make sure that you have a .htaccess file in the root of your web server home directory.
Also make sure that adequate file permissions are set, so that php/joomla can write to .htaccess and add mod_rewrite rules. I would recommend setting .htaccess file permission to 644. If that doesn't work, come back and ask again!
For Search Engine Keyword selection, this tutorial should be sufficient (skip to step 3): http://moz.com/blog/seo-your-joomla-website-in-11-super-easy-steps
A useful link to test if mod_rewrite is enabled on your webserver: http://docs.joomla.org/How_to_check_if_mod_rewrite_is_enabled_on_your_server

Codeigniter on IIS web.config issue

I am installing a site made in PHP/CodeIgniter 2 on a hosting server which unfortunately has IIS running, which I have no experience in.
Nothing is working except the homepage, all other pages are returning 404 errors.
Adding index.php to the url returns 500 - Internal server error (I have the index page config set to '' in the config.php file)
I tried also creating a web.config file thinking the issue might be from the redirects, but adding a web.config file stops even the homepage from working, even if the web.config file added is completely empty.
Help really appreciated.
Check if the hosting server has Re-write module installed in it, that could be your problem.
Make sure you had installed URL Rewrite -
http://www.iis.net/downloads/microsoft/url-rewrite
After you had installed the module you should able to see this icon (URL Rewrite) in your IIS Management.

Categories